Mike Yearwood
Toronto, Ontario, Canada
Howdy Jon
>Here's the deal: On the start of our application I am issuing a bunch of SET CLASSLIB ADDITIVE statements to pull in the libraries. This works like a charm for the application as a whole.
>
>When I try to run EXECSCRIPT on a string that contains object creation code (either with CREATEOBJECT or NEWOBJECT), I get an error back stating that the app cannot instantiate the class or locate the class library in question. If I do an additional SET CLASSLIB for the library in the beginning of the string, I get an error that the alias is already in use.
>
>How am I able to have the code inside the EXECSCRIPT make use of the classes that should already be available?
>
The execscript runs completely outside of the EXE.
Use a routine that you call instead of using SET CLASSLIB by itself. Pass the name of the classlib to the routine. Have this routine attempt a simple SET CLASSLIB to the passed class. If it fails, have it determine the name of any EXE (using PROGRAM()), append the name of the exe to a string and using the string, attempt another SET CLASSLIB TO CLASSLIB.VCX IN EXE.
If it still fails, the class cannot be located and it fails.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only