1 Reply Latest reply on Mar 17, 2011 9:53 AM by WordRad

    Another bug in Flex? (Application.parameters and query strings)

    WordRad

      I'm passing in two query string parameters in the source of SWFLoader and both of them are clumped together in the first parameter by application.parameters.

      But I switch the order of the parameters in the query string and both parameters are returned correctly:

       

      Case #1:

      Query String:  ?cfg=zzzzzzz54B&embed_div=x

      parameters.cfg: zzzzzzz54B&embed_div=x

      parameters.embed_div:  [nothing]

       

      Case #2:

      Query String:  ?embed_div=x&cfg=zzzzzzz54B

      parameters.cfg: zzzzzzz54B

      parameters.embed_div: x

       

       

      Here is the actual debug commands:

       

      Dumper.info(this.url);
      Dumper.info(this.parameters.cfg)
      Dumper.info(this.parameters.embed_div);

       

      And output:

       

      (Case #1)

      [INFO]: file:///C:/Program%20Files/WordRad234/chm/wordrad_kt/web%20pages/zzzzzzz5/rad_3xf.swf?cfg =zzzzzzz54B%26embed_div%3Dx (String)

      [INFO]: zzzzzzz54B&embed_div=x (String)

      [INFO]: (Object)

       

      (Case #2)

      [INFO]: file:///C:/Program%20Files/WordRad234/chm/wordrad_kt/web%20pages/zzzzzzz5/rad_3xf.swf?emb ed_div=x&cfg=zzzzzzz54B (String)
      [INFO]: zzzzzzz54B (String)
      [INFO]: x (String)

       

       

      Something I just noticed: the equal sign after embed_div is replaced by %3D but only if embed_div comes last.

        • 1. Re: Another bug in Flex? (Application.parameters and query strings)
          WordRad Level 1

          NEVERMIND:

           

          It was something I was doing  to the source of SWFLoader beforehand (involving encodeURIComponent).

           

           

          I have to say, I have many, many times thought something was a bug in Flex and it was in fact my code.  In general, I think Flex/AS3 is an elegant and useful product.  The sort of ad hoc  tweaks that have to be done to avoid memory leaks though is ridiculous (though I do have that figured out pretty much as well.)