Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify Class Exist BEFORE Issue CREATEOBJECT
Message
 
To
26/07/2001 13:25:53
Larry Rix
Larry Rix & Associates, Inc.
Westminster, Colorado, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00535887
Message ID:
00535913
Views:
10
>All,
>
>Any suggestions for a method of determining if a class exists in all SET CLASSLIB references BEFORE issuing the CREATEOBJECT command? Also, I would prefer to NOT use the ON ERROR method (which is utter silliness). Suggestions anyone?
>
>Thanks in advance!
>
>Larry
local oObno
use myclasslib.vcx noupdate alias classtab
scan
     if allt(myclasslib.class) == "blahblah"
         use in classtab
         set classlib to myclasslib.vcx additive
         oObno = createobject('blahblah')
     endif
endscan
if used('classtab')
    use in classtab
endif
if Type('oObno') != "O"
   messagebox("Ain't got no defined class!")
endif
I did not test this but you should get the idea.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform