Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiation of an object
Message
From
02/12/2008 05:17:49
 
 
To
02/12/2008 04:24:21
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01365028
Message ID:
01365043
Views:
17
>".. You can not create a reference that hold instances of all classes of a classlibrary."
>
>Yes you can, and I have seen it done, which is why I asked the question.
>
>Furthermore, the original question to which you replied was regarding the show method of a form, referenced as an instantiated object, so clearly you either didn't read my question or you didn't understand it as you went off an a wholly unrelated tangent.
>
>With regards to that, your assistance in this thread is no longer required.

PMFJI, but as I can understand, Agnes is right, even if english is not my native language.

You can not instantiate a whole classlib. There is no command in the VFP language to achieve that. There are a couple of commands to instantiate classes (createobject(), newobject(),...) but all those commands just create one single objectrefence from a single class. A classlib is just a place to store the classdefinition, like a .dbf is a place to store data.

If you want to create an instance (object) of a formclass ("MyFormClass") that is stored in a classlib named "MyClassLib.vcx" you can do something like this:

oForm = newobject("MyFormClass","MyClassLib.vcx")
oForm.show() (or oForm.visible=.T.)
Holger Vorberg
Germany
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform