Put trace statements in event handlers so you can see the order.  There's 
probably a collectionEvent after the insert that is better than UPDATE_COMPLETE 
which gets called often.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of Darrin Kay
Sent: Sunday, November 01, 2009 11:07 PM
To: [email protected]
Subject: [flexcoders] event order issues



Good Morning to all,
  I have a Cairngorm flex app, and I call a function to add something to the 
db, and then after the insert is complete I pull the updated data, and I run a 
sort.  Here is where my problem is, the sort works fine when it is called after 
a click event by the user, but when I make the call after the insert the filter 
is not applied.

here is the code wireframe:

on the insert button I added an 
button.addEventListener(FlexEvent.UPDATE_COMPLETE, setlist); // not sure if 
this is right

I have a as3 function that calls the dispatch event to do the insert all is 
good.

the call happens and the sort is run, but I think this is being done before the 
insert and list re-build is done, so is my eventListener right?


Thanks,
 Darrin

Reply via email to