Well you certainly can put a ChangeEvent if it’s a var, but then the update will only happen when that change event fires (which you are responsible for dispatching unless you pick an event that is already dispatched).  We’ll do the automatic change event thing if it is declared as a regular var (i.e., not a getter/setter). 

 

Yes, if you do the tag it will be declared as a var and is therefore bindable automatically.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of JesterXL
Sent: Saturday, June 18, 2005 11:40 AM
To: [email protected]
Subject: Re: [flexcoders] Binding Internally?

 

Jacked; it works with or without a default value... sorry about that, not sure why it didn't work before; probably just waking up.

 

Why shouldn't I put changeevent if it's a var?  I want to be able to bind to it as a publicly available property (so components that is it can).  Additionally, if it's a tag, is it public, and if so, I assuming bindable as well?

 

----- Original Message -----

From: Matt Chotin

Sent: Saturday, June 18, 2005 2:24 PM

Subject: RE: [flexcoders] Binding Internally?

 

It should work.  What if you use the normal variable but don’t assign the 0 when you declare it.  Instead assign it to 0 in your initialize or something.  Then see what happens when you update it.

 

Don’t put [ChangeEvent] on it if it’s a var.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of JesterXL
Sent: Saturday, June 18, 2005 10:14 AM
To: Flexcoders
Subject: [flexcoders] Binding Internally?

 

Ok, I can't bind a Label's text property to a public property of my MXML
like so:

public var constitution:Number = 0;

<mx:Label text="{constitution}" />

It starts off at 0, but doens't change at a later date, ChangeEvent metatag
or not.

Getter/Setters don't work either.

However, the <mx:Number tag with an id of "constitution" does....

wtf?  What if I, for this one time, don't want to use a tag?  How can I bind
to an AS defined property?

--JesterXL


 



Yahoo! Groups Links

Reply via email to