You know I see this sort of solution a lot but I wonder if you have considered having the second class be a decoration of the first.
Simple example... class myCoreFunctions { private extendedFunctions:myExtendedFunctions; function myCoreFunctions(flag:Boolean){ if(flag){ extendedFunctions = new myExtenededFunctions; } } } class myExtendedFunctions{ function myExtendedFunctions(){ } } Not everything need be extended. Charles P. On 5/7/07, Helmut Granda <[EMAIL PROTECTED]> wrote:
That makes sense and was one of my ideas but lets say a few months from now I need 2 methods from class A and 2 methods from class B to make class C. Then I cant go back and restructure all my code to compensate for the update. So I was wondering if in these cases its best to separate each method into a class. Thanks -h On 5/7/07, Pete Miller <[EMAIL PROTECTED]> wrote: > > Sounds like the second class should be the base class. Extend the > larger from the smaller. > > P. > > >> -----Original Message----- > >> From: [EMAIL PROTECTED] [mailto:flashcoders- > >> [EMAIL PROTECTED] On Behalf Of Helmut Granda > >> Sent: Monday, May 07, 2007 4:10 PM > >> To: Flashcoders mailing list > >> Subject: [Flashcoders] Class structure > >> > >> I'm trying to figure out the best approach for my class structure. I > have > >> form valildation class that checks for different items (about 20 > items), > >> then I needed some items of the same class for a smaller form (only 4 > >> items). I could extend the first class and use it with my smaller > form > >> but > >> there other 16 methods that I dont need to load into the smalle form. > >> What > >> would be a good approach? > >> > >> I know I could create a class for each method and then instiatiate > each > >> one > >> as needed, but is that the best method? I was wondering if there was > a > >> way > >> to tell flash only to get the methods needed and forget the rest. > >> _______________________________________________ > >> 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 > _______________________________________________ > 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 > _______________________________________________ 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
_______________________________________________ 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