[flexcoders] Re: Problem with events, how event dispatched when state change?

2007-11-12 Thread danielvlopes
Hello Ralf, i'm using a binding but the problem is my combo had array collection and labelfield of combo is "nome", for that reason i must loop over my dataprovider of combobox to find the "nome" saved in database and select that "nome" in combo... i had 5 combobox and i not sure create 5 public va

Re: [flexcoders] Re: Problem with events, how event dispatched when state change?

2007-11-12 Thread Ralf Bokelberg
> and i not > sure create 5 public var for selected index is the best way... It is actually - especially because you can unit test it without the ui I'm using a model class for all my comboboxes, which contains the dataProvider and a selectedIndex property. However, if you don't want to go down t

Re: [flexcoders] Re: Problem with events, how event dispatched when state change?

2007-11-12 Thread Ralf Bokelberg
sorry, that message got garbled a bit However, if you don't want to go down that route, you can either use a binding function, if the whole dataProvider is replaced or you add CollectionChange handling to your dataProvider, if it is changed. You can use myArrayCollection.itemUpdated(..) to trigger