On 2/1/07, Andy Herrman <[EMAIL PROTECTED]> wrote:
Even if you're extending Object (so you can do things like this.foo = "stuff" without foo being declared) it's still a good idea to declare them.
Actually, you have to even if extending Object. The only time you don't have to declare private variables is if you specifically set your class to be dynamic: class FixedObject extends Object { public function FixedObject() { foo = "bar"; // Throws an error, since "foo" was never declared. } } dynamic class DynamicObject extends Object { public function FixedObject() { foo = "bar"; // Works fine. foo = new Date(); // Also works fine. } } Generally using dynamic classes is not a good practice, since you can't do compile-time type checking on dynamic classes. (Incidentally, it is possible to create a dynamic subclass of a fixed class, too.) -- T. Michael Keesey Director of Technology Exopolis, Inc. 2894 Rowena Avenue Ste. B Los Angeles, California 90039 -- The Dinosauricon: http://dino.lm.com Parry & Carney: http://parryandcarney.com ISPN Forum: http://www.phylonames.org/forum/ _______________________________________________ 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