8 Replies Latest reply on Sep 23, 2008 6:33 AM by Newsgroup_User

    Error Occurs on the Removal of Mx:Repeater

    alice_data Level 1
      Hi,

      I have a case of which I have several states, and I want to remove the child which contains the repeater element in a particular state. I have tried using the GUI to delete it, but then it always shows me the error on the code view as in the following:

      Severity and Description Path Resource Location Creation Time Id
      1067: Implicit coercion of a value of type Array to an unrelated type flash.display:DisplayObject. myfile/src test.mxml line 1291 1222095339865 16946

      Attached is the code snippet which I would like to remove the child. This is the format I use: <mx:RemoveChild target="{eventsArray}"/>

      Is there something wrong I have done here?
      Anything is appreciated, and thanks in advance.

      Alice
        • 1. Re: Error Occurs on the Removal of Mx:Repeater
          Level 7

          "alice_data" <webforumsuser@macromedia.com> wrote in message
          news:gb8c1o$7qn$1@forums.macromedia.com...
          > Hi,
          >
          > I have a case of which I have several states, and I want to remove the
          > child
          > which contains the repeater element in a particular state. I have tried
          > using
          > the GUI to delete it, but then it always shows me the error on the code
          > view as
          > in the following:
          >
          > Severity and Description Path Resource Location Creation Time Id
          > 1067: Implicit coercion of a value of type Array to an unrelated type
          > flash.display:DisplayObject. myfile/src test.mxml line 1291 1222095339865
          > 16946
          >
          > Attached is the code snippet which I would like to remove the child. This
          > is
          > the format I use: <mx:RemoveChild target="{eventsArray}"/>
          >
          > Is there something wrong I have done here?
          > Anything is appreciated, and thanks in advance.

          You're probably better off putting the repeater in a container and removing
          that.

          HTH;

          Amy


          • 2. Re: Error Occurs on the Removal of Mx:Repeater
            alice_data Level 1
            Hi, Amy:

            I did try to add another container to the block that contains the repeater element, but now it appears that the repeater is no longer displaying even in the order according to the executed result from the HTTPService. Also, it no longer positions the way it should be according to what I specified
            .
            Is there something I have done wrong here?
            Thanks again.

            Alice
            • 3. Re: Error Occurs on the Removal of Mx:Repeater
              Level 7

              "alice_data" <webforumsuser@macromedia.com> wrote in message
              news:gb8o7l$mrb$1@forums.macromedia.com...
              > Hi, Amy:
              >
              > I did try to add another container to the block that contains the
              > repeater
              > element, but now it appears that the repeater is no longer displaying even
              > in
              > the order according to the executed result from the HTTPService. Also, it
              > no
              > longer positions the way it should be according to what I specified

              Could you be more specific? Maybe post a screen capture to flickr?


              • 4. Re: Error Occurs on the Removal of Mx:Repeater
                alice_data Level 1
                Hi, Amy:

                Since I cannot send you any snapshots, I can illustrate this.
                Using the code that you have provided on Re: How to Position Nested Repeater Element, I added the mx:VBox element and changed the value of the y axis. I executed the code, and the x position is accurate, but I think Panel 3 should be the one at the top according to this modified code, but it still gave me Panel 1 as the top one, and it does not appear to be that it is 100 pixels away from each one of them anymore.

                The same thing happened in the version of my code I was working on. The y axis does not seem to be listening the value provided by the panel after mx:VBox is placed in. It showed the results accurately, but it was not giving me accurate y values of each panel that gets generated.

                Attached is the code you provided after my modifications for this particular test. I hope this is clear enough now.

                Thanks a lot for your help.
                • 5. Re: Error Occurs on the Removal of Mx:Repeater
                  Level 7

                  "alice_data" <webforumsuser@macromedia.com> wrote in message
                  news:gb983u$c1c$1@forums.macromedia.com...
                  > Hi, Amy:
                  >
                  > Since I cannot send you any snapshots, I can illustrate this.
                  > Using the code that you have provided on Re: How to Position Nested
                  > Repeater
                  > Element, I added the mx:VBox element and changed the value of the y axis.
                  > I
                  > executed the code, and the x position is accurate, but I think Panel 3
                  > should
                  > be the one at the top according to this modified code, but it still gave
                  > me
                  > Panel 1 as the top one, and it does not appear to be that it is 100 pixels
                  > away
                  > from each one of them anymore.
                  >
                  > The same thing happened in the version of my code I was working on. The
                  > y
                  > axis does not seem to be listening the value provided by the panel after
                  > mx:VBox is placed in. It showed the results accurately, but it was not
                  > giving
                  > me accurate y values of each panel that gets generated.
                  >
                  > Attached is the code you provided after my modifications for this
                  > particular
                  > test. I hope this is clear enough now.
                  >
                  > Thanks a lot for your help.

                  Panel 3 should be 300 pixels from the top of the screen, and Panel 1 should
                  be 0 pixels from the top of the screen, if you're using the XML you pasted
                  in. That would make Panel 1 at the very top and the top of Panel 3 would be
                  300 pixels below the top of Panel 1. I'm not sure what should be 100 pixels
                  away from each one...?


                  • 6. Re: Error Occurs on the Removal of Mx:Repeater
                    Level 7

                    "Amy Blankenship" <amySpamFilter@magnolia_pleaseNOspam_multimedia.com> wrote
                    in message news:gb9nvi$t94$1@forums.macromedia.com...
                    >
                    > "alice_data" <webforumsuser@macromedia.com> wrote in message
                    > news:gb983u$c1c$1@forums.macromedia.com...
                    >> Hi, Amy:
                    >>
                    >> Since I cannot send you any snapshots, I can illustrate this.
                    >> Using the code that you have provided on Re: How to Position Nested
                    >> Repeater
                    >> Element, I added the mx:VBox element and changed the value of the y axis.
                    >> I
                    >> executed the code, and the x position is accurate, but I think Panel 3
                    >> should
                    >> be the one at the top according to this modified code, but it still gave
                    >> me
                    >> Panel 1 as the top one, and it does not appear to be that it is 100
                    >> pixels away
                    >> from each one of them anymore.
                    >>
                    >> The same thing happened in the version of my code I was working on.
                    >> The y
                    >> axis does not seem to be listening the value provided by the panel after
                    >> mx:VBox is placed in. It showed the results accurately, but it was not
                    >> giving
                    >> me accurate y values of each panel that gets generated.
                    >>
                    >> Attached is the code you provided after my modifications for this
                    >> particular
                    >> test. I hope this is clear enough now.
                    >>
                    >> Thanks a lot for your help.
                    >
                    > Panel 3 should be 300 pixels from the top of the screen, and Panel 1
                    > should be 0 pixels from the top of the screen, if you're using the XML you
                    > pasted in. That would make Panel 1 at the very top and the top of Panel 3
                    > would be 300 pixels below the top of Panel 1. I'm not sure what should be
                    > 100 pixels away from each one...?

                    Oops, Panel 3 should be _500_ pixels from the top of the _VBox_, not 300
                    pixels from the top of the screen. Sorry if that was confusing.


                    • 7. Re: Error Occurs on the Removal of Mx:Repeater
                      alice_data Level 1
                      Hi, Amy:

                      Sorry, but I think I am getting a little confused here.

                      In case it is really true that the value of the y attribute is targeted at the VBox and not the screen, would the layout not be Panel 1, Panel 2, Panel 4 and then Panel 3 according to the code?

                      However, when I compile the code through Flex Builder, the output shows that it is still Panel 1, 2, 3 and 4 in its order. I have even tried using 800 for the y value in the embedded XML in the file you provided, but I see no changes in the layout (it is supposed to have a giant 500 pixel gap between Panel 3 and 4, but this is not the output I got.

                      Have I missed something here?

                      Alice
                      • 8. Re: Error Occurs on the Removal of Mx:Repeater
                        Level 7

                        "alice_data" <webforumsuser@macromedia.com> wrote in message
                        news:gbaouv$8lv$1@forums.macromedia.com...
                        > Hi, Amy:
                        >
                        > Sorry, but I think I am getting a little confused here.
                        >
                        > In case it is really true that the value of the y attribute is targeted
                        > at
                        > the VBox and not the screen, would the layout not be Panel 1, Panel 2,
                        > Panel 4
                        > and then Panel 3 according to the code?
                        >
                        > However, when I compile the code through Flex Builder, the output shows
                        > that it is still Panel 1, 2, 3 and 4 in its order. I have even tried using
                        > 800
                        > for the y value in the embedded XML in the file you provided, but I see no
                        > changes in the layout (it is supposed to have a giant 500 pixel gap
                        > between
                        > Panel 3 and 4, but this is not the output I got.
                        >
                        > Have I missed something here?

                        Yes. I am sorry, I wasn't paying proper attention when I was replying to
                        your post. A VBox just lays out its children in the order you hand them to
                        it, according to the rules programmed into it and the properties, like
                        padding, that you give it. If you want to absolutely position your panels,
                        you'll need to use a Canvas.

                        HTH;

                        Amy