Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exclude VCX from a project
Message
 
 
To
03/07/2003 20:24:24
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00806761
Message ID:
00807228
Views:
18
Peter,
#3 and #6 are relatively the same. If you are running within a program and you have the following code somewhere in it:
* I'm running code somewhere here
local lox
lox = createobject('myclass')

define class myclass as custom
procedure Init
* some code here
endproc
enddefine
The class definition is located within the same program as is being executed. This is #3. #6 simply means that the class definition is one of the programs within the call stack, i.e. main program.

#2 means that you loaded the class at some point before. You could at that time have used NewObject and specified the class library or you could have used SET CLASSLIB and then CreateObject. After which, you could have reset CLASSLIB with another SET CLASSLIB command. Because the defintion is loaded in memory, you can create it as many times as you want without the class library being in the CLASSLIB path.

Regards.

>Hi Larry,
>
>I'm looking at the help of the Set Classlib command and I hope you can clarify something for me. In the Remarks section of that command, it stated the following:
>
>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.
>
>What do #2, #3, and 6 really mean?
>
>Thank you,
>
>Peter
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform