I must admit that I just don't understand the interest in code-behind.
When you write
MyComponent.mxml:
<mx:Canvas>
<mx:Script>
public var foo;
public function bar():void { ... }
</mx:Script>
</mx:Component>
you are writing a subclass (of Canvas in this case) and declaring a
property foo and method bar() of that subclass. It's just MXML notation
for
public class MyComponent extends Canvas
{
public var foo;
public function bar():void { ... }
}
So if you love packages and classes, what's the problem with
<mx:Script>?
- Gordon
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Thursday, February 08, 2007 11:43 AM
To: [email protected]
Subject: [flexcoders] What's the "official" consensus of using
CodeBehind??
Hello All,
Could some of you more savvy coders, please take a moment of your
valuable time and throw some words of wisdom out there regarding
CodeBehind?
Since I love using Packages and Classes, it feels very natural for me to
use this method.
BUT, based on where things are going with Flex, is this considered to be
a "good programming practice"?
I would love to know sooner versus later, so that I don't have to back
and redo a bunch of coding. I am a REAL stickler when it comes to good
coding practices.
Thanks in advance for your time on this,
Mike