Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Classes outside EXE
Message
From
30/05/2001 06:05:46
 
 
To
29/05/2001 23:09:11
Nitin Parulekar
New Zealand Software Corp Ltd
Hamilton, New Zealand
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00512506
Message ID:
00512561
Views:
8
Hi!

OurApp.EXE contains a lot of class definitions that could not be found when you use set procedure to. This is because PRG files in EXE could contain DEFINE CLASS statamenet that access custom classes that are not loaded into memory at the moment you use that command. This is just my siggestion. We never use SET PROCEDURE TO ...EXE, we always set up propcedure files by PRG name, and issue SET PROCEDURE TO ... as many times as required.

As about class library - we load all class libraries at the application start. So no need to do SET CLASSLIB in the form load methods. Once libraries are loaded in the memory, they are visible for all external module calls.

There are bugs in the VFP related to setting the class libraries and procedure files from one EXE to another, I guess the same problem happens when you use FXP file.

HTH.

>To All,
>Our framework classes are in the application EXE and obviously any Program/Form in the EXE runs fine. The aplication provides a hook to enable running of any .FXP that may not be in the EXE. It simply has to reside in the same folder as the EXE. The arrangement works fine if the external program has no call to a form that uses any of our framework classes. Forms using Foxpro baseclasses work fine (This is because Foxpro Runtime DLL is included in the Seup Wizard that manages the EXE). I have tried the following in Form.Load() as well as in the Program that calls the form(even though the form's in Private DataSession)
>
>Set Procedure to OurApp.EXE
>SET Classlib to Ourclass.vcx
>
>Yet I keep getting "Class Not Found Error"
>
>Can anyone tell me what else I can do ?
>
>TIA,
>
>Nitin
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform