|
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.
From: Robert Brueckmann [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:14 AM To: [email protected] Subject: RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML Can I ask how you
manage an MXML without any ActionScript at all? How in a file that has
components with click or change listeners would you not have any supporting
ActionScript code…I mean just about every single one of my MXML fileshas
initialize or creationComplete listeners in the parent container tag with dozens
of other components that are dependent on dataproviders changing and user
interactions like clicking or dragging and dropping and I can’t beginto imagine
how I could extract every bit of ActionScript from my MXML files into individual
ActionScript classes…maybe I’m not grasping the Cairgorm designarchitecture
fully…I thought I had a pretty good grasp on it but to hear that you’re writing
MXML files with no ActionScript in them whatsoever kind of baffles me…can you
give me an example? Thanks for bearing with
me! ;) Robert L.
Brueckmann Web
Developer Merlin Securities,
LLC p:
212.822.4821 From: Dimitrios
Gianninas [mailto:[EMAIL PROTECTED] DataBinding
is definitely one of the high points of Flex and is used very often in our first
Flex implementation here at Optimal. I see no need to stop using a feature that
helps make development easier and quicker. We are
now creating prototype Flex UIs for 3 other projects, none of these UIs are
functional, they are mostly screen mock ups. However one of the first things we
do is use data binding to say connect a DataGrid to a form to show end-users
what the final product might do, so in this case data binding is easily and
quickly used for prototyping minimal functionality in
a UI. As for
the "don't ever include AS2 code in MXML ever", well I have to agree with Steven
on that one. As I browse through my MXML code, 65% of the MXML files
don't contain AS2 code at all, however the other 35% do in some small fashion
because it didn't warrant a full blown AS2 class to implement 2-3 lines of
AS2 code to do something. Like Steven said, I pretty much think
this decision is left up to the developer as to how much AS2 code to leave
in a MXML file and when it is time to re-factor it into an AS2
class. Jimmy
Gianninas Software
Developer -
Optimal
Payments Inc. From: Steven
Webster [mailto:[EMAIL PROTECTED]
This message contains information from Merlin Securities,LLC,
or from one of its affiliates, that may be confidential and privileged. If you
are not an intended recipient, please refrain from any disclosure, copying,
distribution or use of this information and note that such actions are
prohibited. If you have received this transmission in error, please notify the
sender immediately by telephone or by replying to this
transmission.
Merlin Securities, LLC is a registered broker-dealer. Services
offered through Merlin Securities, LLC are not insured by the FDIC or any
other Federal Government Agency, are not deposits of or guaranteed
by Merlin Securities, LLC and may lose value. Nothing in this
communication shall constitute a solicitation or recommendation to buy or sell a
particular security. |
- RE: [flexcoders] Theory and Practice: Mixing AS2.0 in ... Dimitrios Gianninas
- RE: [flexcoders] Theory and Practice: Mixing AS2.... Erik Westra
- RE: [flexcoders] Theory and Practice: Mixing AS2.... Robert Brueckmann
- RE: [flexcoders] Theory and Practice: Mixing AS2.... Matt Chotin
- RE: [flexcoders] Theory and Practice: Mixing AS2.... Erik Westra
- RE: [flexcoders] Theory and Practice: Mixing AS2.... Robert Brueckmann

