arrays and repeaters in Flex 1.5

So a hard lesson learned in Flex last week. We have two seperate tags in some custom components that are fed by Arrays of objects. User interaction triggers adding/deleting objects in these arrays. Of course this does not tell the repeater to redraw itself. Originally I had coded use of

repeater.executeBindings()

and things appeared kosher. After a bit of testing strange things would happen with the UI display. Stuff like missing text, etc. We spent a week tag-teaming on it, then finally contacted our Gold Support rep. About 15 minutes into a Breezo, bamm! Doh! Somehow I mssed the fact that the Array class extends te DataProvider class. So, instead of

Array.push(object)

use

Array.addItem(object)

addItem() does a push() and then fires off all needed events to redraw the repeater. Voila!


7 Responses to “arrays and repeaters in Flex 1.5”

  1. January 28th, 2006 | 11:46 pm

    Flex eh.. I’ve not touched CFMX since…2004? :)
    I’m all about PHP5, and the whole “LAMP” model.

    by the way, the site looks awesome.

  2. JabbyPanda
    April 28th, 2006 | 8:53 am

    How did you find out that Array class “extends” DataProvider in Flex framework?

    It is not obviuos if learning class structure by examination of Flex 1.5 source file framework.

  3. doug
    April 28th, 2006 | 9:38 am

    our Gold Support rep in Adobe skooled us on this. Yeah, the docs don’t indicate this very clearly, eh?

    DK

  4. JabbyPanda
    May 3rd, 2006 | 8:06 am

    Yep, Doug, you are right, thanks for your answer.

    We are going to purchase Flex 1.5 software license very soon and I hope Adobe Flex product support will pay off.

    We select Flex 1.5 as our primira technology now because we are going to release our first piece of software this summer.

  5. doug
    May 4th, 2006 | 8:38 pm

    1.5? Surely you will be purchasing Flex 2.0, eh? Yeah, Adobe support was great. Admitedly, we could have used them more then we did, but our first product we rolled out works great. Working on more now. Unfortunately they are all internal apps.

    good luck!

  6. JabbyPanda
    May 11th, 2006 | 10:12 am

    1.5 =)

    We have set the release date of one project to Q2 2006, another one to Q3 2006.

    Flash 9 player will receive penentration rate of 90% not sooner then Q1-Q2 2007, I guess.

    Flex 2 is on our radars, but now… we are going to shell off quite a big ammount of money (20,000 $+) for old technology from 2004 =)

  7. Jennifer
    February 15th, 2007 | 2:18 am

    Keep up the good work »

Leave a reply