I was about to say that. It's besicaly like asp.NET where
you have the tag bas view on the html and the code in C# or VB in a code-behind
file. I use jimmy's method using the viewHelper because otherwise you wouldhave
the mxml file a actionscrip class (code-behind) and the viewHelper also if you
would use the framework.
Omar
Ramos
Technology
Manager
Itacon
Corporation From: Matt Chotin [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 12:31 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML I’m reading these posts
but have no 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). Theonly 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] 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 thiskind
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] 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"
... </mx:Box> Jimmy
Gianninas Software
Developer -
Optimal
Payments Inc. |
- RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MX... Omar Ramos
- RE: [flexcoders] Theory and Practice: Mixing AS2.0 ... Erik Westra
- RE: [flexcoders] Theory and Practice: Mixing AS2.0 ... Robert Brueckmann