I am undecided as to whether or not I want to use the code behind
method for my MXML files and figured I would see what others are
doing. I am currently just using Script blocks at the top of my files
to do event handling, initialization, etc but some of them are getting
pretty big.
So what are
:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Code behind- do you use it?
I am undecided as to whether or not I want to use the code behind
method for my MXML files and figured I would see what others are
doing. I am currently just using Script blocks at the top of my files
to do
I've been thinking about asking the same question, all of the samples
out there seem to embed the actionscript in MXML, however the code
behind scenario seems more like a best practice approach. Personally, I
use code behind everywhere except for procedural initialization code in
my
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Code behind- do you use it?
I am undecided as to whether or not I want to use the code
behind
method for my MXML files and figured I would see what others are
doing. I am currently just using Script blocks
, January 16, 2007 1:27 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Code behind- do you use it?
I am undecided as to whether or not I want to use the code behind
method for my MXML files and figured I would see what others are
doing. I am currently just using Script blocks at the top
So what are others doing? No AS in your MXML files, no code behind, a
mixture of the two?
I use it practically 100% of the time.
If the mxml file only has a small amount of code and is unlikely to expand then
its probably overkill but for anything with more than a couple of methods i use
it.
I highly recommend it as well.
As a simple example, I might want to enhance the List component to
autoscroll to the selected item upon selection. Simply create a class
'AutoscrollList.as' that you can then use that class in your MXML
ui:AutoscrollList /. (code included below)
Like others, I
From an OOP point of view, would you really create a subclass just to divide
the code into smaller pieces?
I guess no. Imho it's better practice to extract real classes/objects from
mxml files, if possible.
Cheers,
Ralf.
On 1/16/07, Daniel Wabyick [EMAIL PROTECTED] wrote:
I highly
Good poont. The example I gave is not exactly describing code-behind. I
would use the ui:AutoscrollList / within another VBox (e.g), not as a
top element.
Nevertheless, I do use code-behinds (using an Actionscript class as the
top element of an MXML component) at times, but usually more as an
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of
ben.clinkinbeard
Sent: Tuesday, January 16, 2007 1:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Code behind- do you use it?
I am undecided as to whether or not I want to use the code behind
method for my MXML files and figured I
10 matches
Mail list logo