Event listener troubles
i'm rather new flash builder, editing app contracted made offshore. have added new service listener never hits, used fiddler see successful querys webservice success (or failure) events never fire.
protected function view1_viewactivatehandler(event:viewnavigatorevent):void
{
var servicemanager:refer_earnservicemanager = new refer_earnservicemanager();
servicemanager.addeventlistener(refer_earnwebserviceevent.recommended_business_service,onr ecommendedbusinesssuccess);
servicemanager.addeventlistener(faultevent.fault,onrecommendedbusinessfail);
servicemanager.getrecommendedbusinesses( businessvo(data).intbusinessid); // businessvo(data).intbusinessid
showbusy();
}
private function onrecommendedbusinesssuccess(event:refer_earnwebserviceevent):void
{
hidebusy();
//appmodel.getinstance().recommendedbusinesslist = event.result
var arrcol:arraycollection = refer_earnwebserviceparser.parserecommendedbusinessresult(event.result);
appmodel.recommendedbusinesslist = arrcol;
if(arrcol.length>1)
{
// navigator.pushview(refer_earnchoosebusiness2,arrcol);
hidebusy();
}
else
{
// navigator.pushview(refer_earnmainview,arrcol[0] businessvo);
hidebusy();
}
}
found answer: there "dispatch" function missed.
case applicationconstants.web_service_recommended_business: { dispatchevent(new refer_earnwebserviceevent(refer_earnwebserviceevent.recommended_business_service,xmlobj)) ; break; }
More discussions in Using Flash Builder
adobe
Comments
Post a Comment