add the -keep argument to the compiler options to see what goes on behind the 
scenes.


----- Original Message ----- 
From: "Michael Labriola" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, March 14, 2008 1:20 PM
Subject: [flexcomponents] Re: Bindable Metatag



Marking a single property bindable causes the compiler(maybe actually
should be said precompiler) to generate a getter and setter for the
property. Within the setter a propertyChanged event is broadcast
whenever the property is set. Also, any place that this property is
accessed via MXML with the {} syntax will now add a listener to that
class for the property changed. I believe the class then also becomes
an IEventDispatcher (and maybe a IPropertyChangeNotifier but I
honestly don't remember for sure)

Marking the entire class bindable does this for every property in the
class. The [Bindable] versus [Bindable(event='')] syntax allows you to
change the default use of the propertyChanged to a new event name. 

This means you can have different events broadcast by each setter as
opposed to a property changed event always being broadcast and then
later interrogated to see if it is the right event. Personally, I like
this for debugging, but there is a little cost overhead here too.

If you want to know more about this, make a simple value object, mark
the whole class bindable and compile it with the keep-genenerated-as
flag on. Is is a great way to see what is happening.

Personal opinion, mark what you need and only what you need,
Mike



--- In [email protected], "reflexactions"
<[EMAIL PROTECTED]> wrote:
>
> I've read the docs but they left me wanting to know more!
> 
> According to the docs I can add [Bindable] at the top of a class to 
> make everything bindable.
> Fine but is there a downside to that or do I just blindly make whole 
> classes bindable "just in case" or do I selectively make bindable only 
> those properties that I know will need it?
> 
> Does making a class or property bindable result in it being wrapped in 
> a proxy?
> 
> If I make a property bindable does it make a difference if I use 
> [Bindable] or [Bindable(event...)] with respect to sub-properties.
> 
> tks
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcomponents/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcomponents/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to