I am trying to bind to a static function, I designate a binding event name and then fire the event from another static function.
[Bindable(event="dataUpdated")]
public static function string(path:String) :String
{
...
}
private static function updateData() :void
{
//doSomthing;
staticEventDispatcher.dispatchEvent(new Event('dataUpdated'));
}
private static var staticEventDispatcher:EventDispatcher = new EventDispatcher();
My view is not updating when the event is fired, is there a better way to do this?
I have also tried dispatching the event from an instance of the class, I added this staticEventDispatcher
as a last resort, but it didn't work.
The point in this if for language translations within the app, MyClass.string('stringPath')
will return the translated component text. I need the app text to be updated when the user changes their language.