Using callLater in a PureMVC Mediator

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.

Social


profile for Jonathan Rowny at Stack Overflow, Q&A for professional and enthusiast programmers