Robert, following the same problem I had...I managed it by dispatching the event only after I receive the req. info and then loading the configload() function. So, inside the result handler I have
ViewerContainer.dispatchEvent( new AppEvent("secTokenReceived",data) );
loadConfig();
Then in the init() of mapmanger.mxml I have
ViewerContainer.addEventListener("secTokenReceived", secTokenHandler);
The token can now be seen in the switch statement.Now, I want to receive the same information in your identify widget (Version 2.2.3f - Mar. 29, 2011) so in the init() of Identify Widget I added
drawTool.addEventListener("secTokenReceived", resultHandler);
and in the result handler
private function resultHandler(event:AppEvent):void
{
secToken = event.data.secToken;
Alert.show(secToken);
}
However, I do not see anything in the alert.The event is already dispatched in configmanager.as. What am I missing here? To summarize I have the secToken in configManager.as(from where I dispatch the event) and I want the token in the IdentifyWidget. How can I achieve this?Thank you.