You will need to have a handler function called by the result event, and
apply the formatting from that.

 

The player is single threaded (from the developers viewpoint), there is
no code blocking, and all RPC calls are asynchronous.  You can not,
ever, access the result in the same function you invoke send.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of saltzmanjoelh
Sent: Friday, November 21, 2008 1:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] wait for service call to end

 

I am trying to make a formatter for a column. So i call my format
method. 

format method should call my service to get the category from the DB
return the category name

then, the category service sets the category var on results

If i try this it doesnt wait for the categoryService thread to finish
before
returning the value. How do I get it to return after the service call is
done?

private function formatCategory(item:Object,
categoryId:AdvancedDataGridColumn):String{
categoryService.flex_show.send({id: item.categoryId});
return category.name
}

 

Reply via email to