i would have to agree - i use the built in ones and can't see any benefit from using bespoke ones apart from maybe being able to use the variable name i want rather than adding extra characters to it (although i use a leading underscore for class variables anyway)
On Tue, Dec 9, 2008 at 10:48 AM, Ian Thomas <[EMAIL PROTECTED]> wrote: > 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 > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders