Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Classes with the same name
Message
From
28/02/2002 07:06:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/02/2002 00:15:07
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00626180
Message ID:
00626276
Views:
18
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform