Hi Rick,

Both will work, but you don't need the binding (curly) braces for events
(click).  This is a common mistake; one that I've made myself.  In
essence, when you use the curly braces to bind, you are creating an
event listener; usually to a variable.  When the variable changes
(except for arrays), the binding mechanism will automatically update any
properties that are bound to the variable.  This works great for
properties and styles, but is un-necessary for events. Simply by using
an event in an mxml tag, you are already doing the same thing; creating
an event listener.  When the event is dispatched, do something; done. 
Sometimes binding is confused with just referencing properties and
methods.

-TH

--- In [email protected], Rick Schmitty <flexc...@...> wrote:
>
> Is there a difference between
>
> <mx:Button click="onClick()"/>
>
> and
>
> <mx:Button click="{onClick()}"/>
>
> The only thing I've notice is in the latter I can CTRL+Click on
> onClick and it takes me to the onClick function, while the first one
> does nothing
>


Reply via email to