That was my initial approach too, but eventualy it was easier to track bugs and 'mis-references' since i extended the component i was accessing. Now i get an error when i try to reference a textfield that isnt there. Another thing that is a pro for this kind of approach, is that the mxml file doesnt have to know wich method to call in the helper class.
 
Greetz Erik
 


From: Dimitrios Gianninas [mailto:[EMAIL PROTECTED]
Sent: donderdag3 maart 2005 16:22
To: [email protected]
Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

I tend to put such code in the corresponding ViewHelper class, so every view (MXML file) has a corresponding ViewHelper class. See sample below:
 
Inboxes.mxml
<mx:Box>
    ...
    <vw:InboxesViewHelper id="inboxesHelper" view="{this}"/>
     ...
 
    <mx:List id="inboxList" width="165" height="100%" labelField="name"
            vScrollPolicy="auto" change="inboxesHelper.doLoadInbox(inboxList.selectedItem.id)" />
 
     ...
</mx:Box>
 
Jimmy Gianninas
Software Developer - Optimal Payments Inc.
 

Reply via email to