I use Actionscript getters and setters. Because I can start off using ordinary public properties, and change them into getters and setters if I need more control/notification without changing any of the code that _uses_ my class.
In order to achieve that otherwise, I'd have to make a getValue() and setValue() for every single public property (as is done in Java). And a fair few of those would simply be this._property=value (setter) or return this._property (getter) i.e. essentially just placeholder methods that bloat the code. The beauty of the actionscript get and set functions is that they are indistinguishable from public properties from the outside of the class. It's a huge improvement over Java. Ian On Tue, Dec 9, 2008 at 10:24 AM, allandt bik-elliott (thefieldcomic.com) <[EMAIL PROTECTED]> wrote: > hi guys > > quick poll - Do you use the actionscript getter/setter functions or do you > make your own, and why. > > I've noticed with a lot of the public domain code (like SWFAddress, for > instance) that you see a lot of 'public function getVariable()' type getters > instead of using the flash 'public function get variable()' adobe > recommended getters(and setters) and i was wondering why people do this? > > thanks > a > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

