Try this;
import mx.core.UIComponent;
public class nonUIClass
{
private var callLaterObject:UIComponent;
public function invalidate(func:Function):void
{
if (!callLaterObject)
{
callLaterObject = new UIComponent();
}
engine.callLater(func);
}
public function invalidateSomething():void
{
engine.callLater(updateSomething);
}
public function updateSomething():void
{
}
}
Peace, Mike
Hi all,
I need to use the equivalent of UIComponent.callLater() but from a
non-UIComponent class.
I've tried using the top level application using
mx.core.Application.application.callLater()
but that doesn't seem to work to call my non-ui object's method. Does
that function only work if you're calling it from the same class as
the callback method?
Does anyone know of another way to do this?
thanks,
Thunder
see code example
import mx.core.Application;
public class nonUIClass
{
public function invalidateSomething():void
{
// try to call the update function on next update
mx.core.Application.application.callLater(updateSomething);
// I've tried both of these methods..
// shouldn't make a difference right?
mx.core.Application.application.callLater(this.updateSomething);
}
public function updateSomething():void
{
// not being called by callLater in invalidateSomething()
}
}
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
- [flexcoders] using application.callLater from a non... thunderstumpgesatwork
- Re: [flexcoders] using application.callLater fr... Michael Schmalle
- Re: [flexcoders] using application.callLate... Michael Schmalle
- Re: [flexcoders] using application.call... Michael Schmalle
- [flexcoders] Re: using application.... thunderstumpgesatwork
- Re: [flexcoders] Re: using app... Michael Schmalle
- [flexcoders] Re: using app... thunderstumpgesatwork
Reply via email to