Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Classlib in Runtime?
Message
From
23/06/2003 16:10:15
 
 
To
23/06/2003 12:34:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00802957
Message ID:
00803072
Views:
7
>I'm using VFP 7.0
>
>I was under the impression that I didn't have to Set ClassLib inside an exe file. All I had to do was include the ClassLib in the project when I built the exe file.
>
>My exe file just stops dead (no error, not anything) when it encounters NewObject() (method or function) if I haven't specifically Set ClassLib to the ClassLib in question. Even including the ClassLib in the NewObject() parameters doesn't help.
>
>Am I missing something?
>
>TIA

Hi Bill.

When using CreateObject you MUST have the class library included in the class libraries to be searched. This means you must included it in the Set Classlib command either before calling the exe or in the exe itself. If you are referencing the class labraries in variables rather than literals be sure it is included in the project.

I like the NewObject function much better because I can pass the class library name as the second parameter and I don't have to deal with the set classlib. If you are using the NewObject function properly, and this is failing, I suspsect there is something wrong with the class you are trying to instantiate, not the call itself. You might do a trace on it a see what happens.

Regards,
- Glen -

The impossible we do immediately.
The miraculous will take a little longer.
Previous
Reply
Map
View

Click here to load this message in the networking platform