Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 920919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:47:40+00:00 2026-05-15T18:47:40+00:00

I’ve been kinda stuck in trying to organize data and bind them to a

  • 0

I’ve been kinda stuck in trying to organize data and bind them to a Repeater in one my applications.
What I did at first, was to save an array of arrays, so that I could’ve accessed any value very easily. But then I realized that I needed to bind them to a Repeater, so I had to switch to an ArrayCollection of arrays. But the Binding issues weren’t solved, since there are still arrays (not bindable) inside the ArrayCollection. So, what can I do??

Below an example of what I want to do:

<mx:Script>
    <![CDATA[
        import mx.collections.ArrayCollection;
        [Bindable] public var arr:ArrayCollection = new ArrayCollection(
            [[              {v:"1", s:"f"}, {v:"1", s:"p"}, {v:"1", s:"c"}, {v:"1", s:"q"}
            ], [
                {v:"1", s:"f"}, {v:"1", s:"p"}, {v:"1", s:"c"}, {v:"1", s:"q"}
            ]]
        );
        protected function button1_clickHandler(event:MouseEvent):void
        {
            trace(arr.getItemAt(0).length);
             arr.getItemAt(0).splice(0, 1);
             trace(arr.getItemAt(0).length);
        }

    ]]>
</mx:Script>
<mx:HBox>


<mx:Repeater id="rep" dataProvider="{arr.getItemAt(0)}">
    <mx:Label text="{rep.currentItem.v}" />
</mx:Repeater>
    <mx:Button label="del" click="button1_clickHandler(event)" />
</mx:HBox>

the traces show that the array size changes, but the repeater doesn’t update.
Any idea?? What’s the best practise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:47:41+00:00Added an answer on May 15, 2026 at 6:47 pm

    Binding updates a destination when the source changes. In complex objects–such as an array–that source is a pointer to some other memory location. In this situation you are not changing the source; only the item the source points at. And therefore binding will have no affect.

    That said, repeaters are unusual beasts and I suggest you don’t use one. Use a list based class, such as a List. This will be less performance intensive than using a repeater, thanks to renderer recycling.

    Inside the list based class; your dataProvider is turned into a ListCollectionView; and it in turn listens for the CollectionChange event of your dataProvider to modify the displayed items when elements in the dataProvider change. You have no such code when using a repeater.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.