It seems that you first example is the considered best practice at the moment
 
create an explicit setter on your component and pass in the data object that way
 
Regards,
 
Bjorn Schultheiss
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of sinacapho
Sent: Wednesday, 4 October 2006 3:51 PM
To: [email protected]
Subject: [flexcoders] The pass the parameter or reference the component (which better?)

Dear all,
i have some question about passing parameter. For example , i
have a user data object which stored the information of the user.
When i have some custom component which may use this object, which
method is better?

a) Pass it in the object (for example)

<xx:Component user_object="{user_data}"/>

b) Reference it inside the custom component
in Component.mxml

<mx:VBox>
<mx:Label text="{parentDocument.user_data.name}"/>
</mx:VBox>

Which one is better for performance?
thx

capho

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to