You sure it didn't fire? A much more common error is that the listener
isn't listening yet.
This isn't fire when called on creationComplete, but when called on click event of a button object it did fire something up and return the expected output. I don't seem to get the logic why it fires on a button event and not on creationComplete event.
If u don't mind can u post the sample code.. define listener to listen this event... i think this will not solve ur problem please post the sample code if u don't mind
If some other thing adds the listener after the creationComplete, then it
will be there for a button click. Try a test using hasEventListener before
dispatching to see if anybody is listening.
I'm using RobotLegs, the idea is that, when the above function is called something like this
<?xml version="1.0" encoding="utf-8"?>
xmlns:mx="library://ns.adobe.com/flex/mx" width="552" height="300" xmlns:views="com.jd.test.views.*"
private function init():void
protected function button1_clickHandler(event:MouseEvent):void
init(); <-- this will fire an output
protected function vbox1_creationCompleteHandler(event:FlexEvent):void
init(); <-- this does not
<!-- Place non-visual elements (e.g., services, value objects) here -->
<views:UserDataDisplay id="userGrid"/> <--- this is a datagrid custom component
<s:Button label="Button" click="button1_clickHandler(event)"/>
</mx:VBox>My question is, why did it fires on a button click, and not on object creationComplete? I don't think it something on the listener cause it doesn't throw any error. If the listener is null, I'm certain it will throw error saying "Cannot access a property or method of a null object reference"
Where you are trying to listen the UserEvent.LOAD_DATA event ....??? Are you listening the event in UserDataDisplay component..??
Can you tell where exactly you are listening to this event and how..??
I have a Mediator class that has these functions
override public function onRegister():void
public function retrieveHandler(event:UserEvent):void
where view refers to the UserDataDisplay