Mike, Well you can use CreateObject() without worrying about where the source code is held and I usually prefer CreateObject to NewObject() exactly for that reason. In fact I normally daisychain my class files with each one calling the next one as in a chain of responsibility pattern.
I guess that there is no right or wrong way of doing it but I find that I can easily keep all the classes isolated using this method without worrying about the path where the actual source code is located. As I said to Jan there are, as we are well aware, many ways to skin a cat or in this case "fox". Dave Crozier -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of MB Software Solutions General Account Sent: 22 December 2008 15:20 To: ProFox Email List Subject: Re: Newbee - working with a programmatically created text box Dave Crozier wrote: > Joe, > Put all your class code into a separate .prg file eg > \Classes\VFP_Classes.prg. > Make sure the path to this file is in the VFP path eg set path to .\Classes\ > > In the VFP_Classes.prg make the first statement a return: > > * VFP_Classes.prg > > Return > > Define class clsMyTextBox as Textbox > ... > Enddefine > > Define class clsMyGrid as Grid > ... > Enddefine > > ...etc etc > > In your initialization program you can then simply "do VFP_Classes". From > then on you can create classes/objects using CreateObject() etc. whenever > you want. > > This is not the only way to do it as you can create classes in many other > ways for example from Visual class libraries etc. but it is the easiest way > when you are starting out. > > Dave Crozier Hmmm....that's a cool way, Dave. I never thought of that. I guess it's no different than the method I use (oUtils = NEWOBJECT("UtilityClass",".\progs\_utils.prg"). Any advantage to your way? [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/d773b7622d0d43dda89b79fd46820...@develop ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

