The databinding notation x="{posBox*2}" binds x to the value posBox*2 so
that x automatically updates when posBox changes.

If you don't want this to happen, you can't use the databinding
notation. 

Instead, set the x position in the initialize or creationComplete
handler:

<mx:Box id="myBox" creationComplete="myBox.x = posBox*2"/>

This will set x once, when the Box is created.

- Gordon


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of negttid
Sent: Wednesday, January 04, 2006 3:18 AM
To: [email protected]
Subject: [flexcoders] need call-by-value instead of call-by-reference

hello Flexcoders,
i have a problem with a variable, which is automatically updated, but
i don't need that. How can I just use the VALUE of that variable and
no REFERENCE???

Example
<mx:Box id="myBox" x="{posBox*2}" .../>

I initialize this with posBox = 3


Now I want to do:
posBox = 5; // this already effects myBox, which I want to avoid! How?
myBox.x=(posBox*2+3); // NOW I want to effect myBox!

Every idea welcome!
Regards,
Matthew







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to