[flexcoders] Re: Best Practice Data Binding

2008-07-02 Thread mauricen
Thanks to everyone who replied to this. Since I think my biggest problem is understanding the translation of the MXML tag, the way to go for me is to look at the MXML documentation and to read the generated code (thanks - I'd forgetten about that). My overall comment is that the documentation is

[flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread mauricen
Thanks very much for your time in writing this; it's very helpful. But my question still stands: if there are parts of your answer that I don't understand fully, or that raise more questions in my mind (and both of these are in fact the case), how do I resolve these difficulties? How did you

RE: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Rick Winscot
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mauricen Sent: Tuesday, July 01, 2008 8:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best Practice Data Binding Thanks very much for your time in writing this; it's very helpful. But my question still stands: if there are parts

Re: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Josh McDonald
Honestly, fucked if I know how I picked all this stuff up - it's just what I do. But if my explanation left something out, that's my fault for giving a shitty explanation. Tell me in detail what you're still confused about, and I'll try and explain it :) -Josh On Tue, Jul 1, 2008 at 11:14 PM,

RE: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Stephen Gilson
Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mauricen Sent: Monday, June 30, 2008 6:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best Practice Data Binding Where *is* the authoritative story on binding

[flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread securenetfreedom
Josh, That's one of the better explanations I've seen on the subject. It fills the blanks left by http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.html. Thanks for the contribution. And BTW, the keyboard is a bad place to be while consuming adult beverages, partaking in a

RE: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Rick Winscot
To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best Practice Data Binding Josh, That's one of the better explanations I've seen on the subject. It fills the blanks left by http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.html. Thanks for the contribution. And BTW

Re: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Josh McDonald
Heh :) I don't think there was anything at all wrong with your response mate, although the generated directory can be a scary place, there's a *lot* of actionscript classes that go into making a Flex swf do its thing. I do apologise if I come off as a jerk, but I can't apologise for the

Re: [flexcoders] Re: Best Practice Data Binding

2008-07-01 Thread Josh McDonald
I wasn't being a jerk here (or angry about anything). If I put effort into an explanation and it doesn't actually clear up the question, I wanna know about it so I can add to it, and hopefully do a better job next time. -Josh On Wed, Jul 2, 2008 at 12:22 AM, Josh McDonald [EMAIL PROTECTED]

[flexcoders] Re: Best Practice Data Binding

2008-06-30 Thread mauricen
Where *is* the authoritative story on binding? As a newcomer to Flex I'm finding it hard to form a coherent picture of how the various binding features fit together. What's the mechanism, for example, that allows me to call addEventListener on a Bindable property? If there's no formal

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-30 Thread Josh McDonald
The authoritive story is pretty much as Daniel said: [Bindable] public var myField:String; The above will generate something the equivalent of: mx_internal var _myField:String; //Might be private, can't be arsed to check [Bindable event=propertyChangeEvent] public function get myField():String

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-28 Thread Daniel Gold
The only difference in what you're doing in the two examples is declaring a custom event in the second example. As Doug said, you can place the Binding metadata tag over the getter or the setter, it makes no difference. If you don't declare a custom event, an extra set of functions will be wrapped

[flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread securenetfreedom
Any thoughts? In an DataModel class what is the best way to bind data. 1) Make the Setter Bindable, or 2) Make the Getter Bindable and dispatch an event on the Setter? What are the advantages and disadvantages of each? // Binding #1 [Bindable] public function set foo(val:String):void{

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Richard Rodseth
I do 2) all the time. Didn't know 1) was even an option. On Fri, Jun 27, 2008 at 12:08 PM, securenetfreedom [EMAIL PROTECTED] wrote: Any thoughts? In an DataModel class what is the best way to bind data. 1) Make the Setter Bindable, or 2) Make the Getter Bindable and dispatch an event on

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Doug McCune
If you define a getter and a setter you can add the [Bindable] metadata to either the getter or setter, it does the same thing either way. The only time you have to use a custom event to trigger the binding is when you have read-only properties (a getter but no setter). Doug On Fri, Jun 27, 2008

RE: [flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread Alex Harui
: Friday, June 27, 2008 1:21 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Best Practice Data Binding If you define a getter and a setter you can add the [Bindable] metadata to either the getter or setter, it does the same thing either way. The only time you have to use a custom

[flexcoders] Re: Best Practice Data Binding

2008-06-27 Thread securenetfreedom
I found this page to be helpful but not authoritative (This is where I found the use of binding the setter); http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.ht\ ml http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_8.h\ tml // Binding #1 [Bindable] public