Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLASSLIB bug in VFP6 SP5 ?
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00794018
Message ID:
00795046
Views:
21
Aaron,

Your reply goes in an opposite direction than your original post:

>loads all the class libraries assigning them ALIAS's that are equal to
the stem of the VCX filename, i.e.

C:\Path\MyClass.VCX ALIAS MyClass


There is no need to supply an alias, you should just:
set classlib to C:\Path\MyClass.VCX additive
VFP only needs the SET CLASSLIB in order to instantiate CreateObject() created objects and it take the first one it finds of that name along the SET CLASSLIB list.

It sounds like you need to rearchitect your system by renaming classes or switching to NewObject()

>There is one good reason... Some calls to CREATEOBJECT include the class library because there are classes with the same name in different libraries, so a search through all loaded libraries for a specific class name wouldn't necesarily return the correct class.
>
>If I'd known before hand this kind of issue existed, I would have taken steps to ensure all class names were unique, however thats not the case and hind-sight's 20/20, meanwhile, I have a huge application with a serious problem.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform