I’m reading these posts but haveno time to respond (nor to any other posts right now), though the discussion is a good one and I don’t have strong opinions either way (taking into account of course that I’m strongly loyal to binding).  The only thing I’ll contribute is that I’m gonna refer to Erik’s technique as view-behind in deference to the ASP.NET approach called code-behind (eh, I don’t know how the punctuate it).  I now expect a nickel every time I see view-behind in a flexcoders post J

 

Carry on,

Matt

 


From: Erik Westra [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 10:30 AM
To: [email protected]
Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

 

That was my initial approach too, but eventualy it was easier to track bugs and 'mis-references' since i extendedthe 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: donderdag 3 maart 200516: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