is there a way to dispatch the event from the command file? that would solve the problem
Thanks for the help, Darrin On Mon, Nov 2, 2009 at 8:09 AM, Darrin Kay <dar...@stop-ing.com> wrote: > I put in the trace, and it is going to the sort before the result is back > from the db. Any suggestions? > > > On Mon, Nov 2, 2009 at 7:42 AM, Alex Harui <aha...@adobe.com> wrote: > >> >> >> 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:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On >> Behalf Of *Darrin Kay >> *Sent:* Sunday, November 01, 2009 11:07 PM >> *To:* flexcoders@yahoogroups.com >> *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 >> >> >> > >