var recordID:uint = 0;
Check if it works ?
-abdul
On 6/15/06, Doug Arthur <
[EMAIL PROTECTED]> wrote:
Hi, I'm trying to call a cfc and put the results into a bindable public var and use that on the page. But the problem is that when I call the method on the cfc, it doesn't put the value into the var immediately as expected... Here's the code, maybe that'll be more helpful:<mx:RemoteObject id="cfSrvc" destination="ColdFusion"
source="flexapps.new.viva.components.model.Record"
showBusyCursor="true">
<mx:method name="init" result="initRecord(event)" />
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;[Bindable]
public var recordID = 0;
public function initRecord(event:ResultEvent):void {
var record = event.result;
recordID = record.recordID;
trace('initRecord method: ' + recordID);
}
public function addRecord():void {
cfSrvc.init();
trace('addRecord method: ' + recordID);
}
Logically I'd think what should happen here is that when addRecord() is invoked, the init() method on the cfc should be invoked, then the value from the cfc is inserted into the recordID var and then the process continues... But instead, the init() method is getting invoked, the addRecord() method is completing before the values from the initRecord bind to the var.Here's the trace resultsaddRecord method: 0 // <---- This should not be before initRecord since this trace logically comes afterwards because cfSrvc.init() invokes initRecord()...initRecord method: nWhat am I missing here???Thanks!- Doug
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] RemoteObject call results into a bindable var... Abdul Qabiz
Reply via email to

