I prefer the former. Using get and set is so much nicer. Besides, I do a lot of Exe based flash work, and being able to execute functions using variable assignment style expressions is a lifesaver.
Lee -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Tann Sent: 26 April 2006 16:38 To: Flashcoders mailing list Subject: [Flashcoders] [POLL] getters & setters preference Hello all, After a long time of trying to figure which method of using getters & setters is better I though the best way to get a good answer is to throw it open to the list. Do you prefer to use the inbuilt getter & setter functionality? i.e. public function get myProperty():Number{ return _myProperty; } public function set myProperty(intSet:Number):Void{ _myProperty = intSet; } or do you prefer using normal functions? i.e. public function getMyProperty():Number{ return _myProperty; } public function setMyProperty(intSet:Number):Void{ _myProperty = intSet; } I like the first method as it looks cleaner, but there have been issues with inheritance where if you overwrite either the getter or setter, but not both in the child class it gets ignored. What are your views? Jim _______________________________________________ [email protected] 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 _______________________________________________ [email protected] 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

