Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking class definitions
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00813240
Message ID:
00813269
Views:
7
One of the solutions is:

lerror=.f.
on error lerror=.t.
lo=createob("Hello")
on error
if lerror
* Class not exist, not registered, not supported ....


>Is there a way to verify that a class definition, ie "object.classname" exists before using createobject to create the object?
>
>We are writing hardware interfaces for a POS program, and when a user chooses a hardware device and tries the device, sometimes it crashes because they haven't installed the hardware device drivers properly.
>
>Anyway, it's annoying to me and the user when class definitions don't exist, or haven't been installed and they get an application shutdown message.
>
>Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform