Using callLater in a PureMVC Mediator
Submitted by jrowny on Wed, 10/22/2008 - 07:00
This may seem obvious to most people but I needed to use calllater today in a mediator because its view component was not done initializing and I realized "callLater is a method of the flex framework, specifically the UIComponent, and the mediator, being an AS3 only class, doesn't have a callLater function! OH NO!"
Okay, so the solution is so simple. A mediator has a view it is responsible for, viewComponent... right? So just callLater on that.
viewComponent.callLater(someFunction);
The function in this example, "someFunction", is inside the mediator.
Bookmark/Search this post with:
Usefull. Thank you.
Submitted by Guillaume St-Jean (not verified) on Fri, 11/20/2009 - 13:23.I had to use :
FlexGlobals.topLevelApplication.callLater(someFunction);
good catch
Submitted by jrowny on Mon, 11/23/2009 - 13:17.Perhaps mediator's view was not done initializing. Good catch!