Environment versions
Network:
Windows 2003 Server
>>>The ExecScript() dumps the code into temporary PRG, compiles and runs it. It's the same as running external PRG.
Yes, it's the first time of usage that loads this class into memory so the PRG created by EXECSCRIPT() finds it in memory.
SET CLASSLIB TO ...vcx is set, the external fxp created by execscript() also sees this setting. I wonder why this is not sufficient, as SET CLASSLIB does open that vcx and the help on SET CLASSLIB also states:
When CREATEOBJECT( ), ADD OBJECT in DEFINE CLASS, or the AddObject method is issued, Visual FoxPro searches for the class definition defining the object specified in these commands in the following locations and order:
1. The Visual FoxPro base classes.
2. Class definitions in memory in the order they are loaded.
3. Class definitions in the current program.
4. Class definitions in the .vcx class libraries opened with SET CLASSLIB.
5. Class definitions in procedure files opened with SET PROCEDURE.
6 Class definitions in the Visual FoxPro program execution chain.
7. The OLE Registry if SET OLEOBJECT is set to ON.
I wonder if you can load a class into memory without instanciating it. Which would solve the problem. Or if there is a RELEASE CLASSLIB or CLEAR CLASS/CLASSLIB. OR RELEASE ALL or CLEAR ALL running before the CREATEOBJECT, which would explain the problem.
Bye, Olaf.
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