On Feb 1, 2006, at 10:14 PM, Helmut Granda wrote:
For example if I have a property (array) inside a class it must be
public so other intances of the object I create can access that
property and they can write to it? And if that is true, how would I
avoid having the property re-assigned (deleted or set back to its
default value)? I guess here is where I have to have an if
statement that checks if the property (array) already has values
just "push" the next values into it.
Would you say Im in the right track?
Mostly.
Typically, the manager itself would have a function to instantiate
the button. But even if you don't go that route, you would probably
use a "setter" method. Which (from the button's perspective) might
look something like:
buttonManager.addButton(this);
And then the button manager's function would receive that reference,
perhaps loop through the array to be sure it isn't already there, and
if not, add it with a array.push
More clear?
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders