>I have an app which is part MM, part not. Many classnames overlap between the MM parts, and the non-MM parts, which means problems when calling createobject('DupeClassName').
>
>When setx runs, it first sets the classlibs of my non-MM parts, which means if I do createobject('BizObjName'), I get the non-MM class to instantiate. I've written a PRG which hardcodes a solution (through RELEASE CLASSLIB ALIAS X IN APP), but it's obivously not very flexible.
>
>Is there another way in MM to handle duplicate class names? And does this mean that duplicate class names are forbidden in MM?
>
>Thanks
>
>David
David,
VCXes are also tables which you can alias.
set classlib to ('classes1\myClassLib') alias my1 additive
set classlib to ('classes2\myClassLib') alias my2 additive
set classlib to ('classes3\myClassLib') alias my3 additive
o1 = createobject('my1.myclass')
o2 = createobject('my2.myclass')
o3 = createobject('my3.myclass')
In VFP6 and up NewObject() is an easier way.
Cetin