Re: [Flashcoders] Can Variables have listeners?

2006-05-26 Thread eka

Hello :)

open Flash help (F1) and search in the actionscript dictionnary 
Object.watch and Object.unwatch :)

EKA+ :)

2006/5/26, Mike Anderson [EMAIL PROTECTED]:


Hello All,

I have a ton of components scattered throughout my application, and most
of them react to changes of a specific variable.

It's getting really old, having to manually write code - that updates
all these controls with the new value of a specific variable, when a
specific variable changes.  It would be nice to just have ONE function,
that propagates all the changes to all my controls, and then have an
active listener applied to a variable which automatically triggers that
specific function.

Am I overlooking something, or is there a better way to do something
like this?

Thank you all in advance, for any suggestions you can throw my way.

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Can Variables have listeners?

2006-05-26 Thread Merrill, Jason
Object.watch();

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Friday, May 26, 2006 2:22 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Can Variables have listeners?

Hello All,

I have a ton of components scattered throughout my application, and
most
of them react to changes of a specific variable.

It's getting really old, having to manually write code - that updates
all these controls with the new value of a specific variable, when a
specific variable changes.  It would be nice to just have ONE
function,
that propagates all the changes to all my controls, and then have an
active listener applied to a variable which automatically triggers
that
specific function.

Am I overlooking something, or is there a better way to do something
like this?

Thank you all in advance, for any suggestions you can throw my way.

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Can Variables have listeners?

2006-05-26 Thread phaedrus
Sounds like you want to wrap the variable(s) in a class and have that class
broadcast events that your components can listen for and react to.

I haven't gotten to the chapter yet, but I think Moock's  Essential
Actionscript 2.0 describes it in Chapter 352 (Observer Design Pattern)

Alternatively, you might do it by using mx.events.EventDispatcher in your
wrapper class.

- phaedrus

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Anderson
Sent: Friday, May 26, 2006 1:22 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Can Variables have listeners?

Hello All,

I have a ton of components scattered throughout my application, and most
of them react to changes of a specific variable.

It's getting really old, having to manually write code - that updates
all these controls with the new value of a specific variable, when a
specific variable changes.  It would be nice to just have ONE function,
that propagates all the changes to all my controls, and then have an
active listener applied to a variable which automatically triggers that
specific function.

Am I overlooking something, or is there a better way to do something
like this?

Thank you all in advance, for any suggestions you can throw my way.

Mike
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Can Variables have listeners?

2006-05-26 Thread phaedrus
*heh* 

Didn't know that existed. Much simpler than my recommendation.

- phaedrus

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eka
Sent: Friday, May 26, 2006 1:55 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Can Variables have listeners?

Hello :)

open Flash help (F1) and search in the actionscript dictionnary 
Object.watch and Object.unwatch :)

EKA+ :)

2006/5/26, Mike Anderson [EMAIL PROTECTED]:

 Hello All,

 I have a ton of components scattered throughout my application, and most
 of them react to changes of a specific variable.

 It's getting really old, having to manually write code - that updates
 all these controls with the new value of a specific variable, when a
 specific variable changes.  It would be nice to just have ONE function,
 that propagates all the changes to all my controls, and then have an
 active listener applied to a variable which automatically triggers that
 specific function.

 Am I overlooking something, or is there a better way to do something
 like this?

 Thank you all in advance, for any suggestions you can throw my way.

 Mike
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Can Variables have listeners?

2006-05-26 Thread Kevin Newman
You might also look into mx.events.EventDispatcher (and to avoid scoping 
issues, mx.utils.Delegate).


Kevin N.


eka wrote:

Hello :)

open Flash help (F1) and search in the actionscript dictionnary 
Object.watch and Object.unwatch :)

EKA+ :)

2006/5/26, Mike Anderson [EMAIL PROTECTED]:


Hello All,

I have a ton of components scattered throughout my application, and most
of them react to changes of a specific variable.

It's getting really old, having to manually write code - that updates
all these controls with the new value of a specific variable, when a
specific variable changes.  It would be nice to just have ONE function,
that propagates all the changes to all my controls, and then have an
active listener applied to a variable which automatically triggers that
specific function.

Am I overlooking something, or is there a better way to do something
like this?

Thank you all in advance, for any suggestions you can throw my way.

Mike







___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com