Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiation of an object
Message
De
02/12/2008 05:17:49
 
 
À
02/12/2008 04:24:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01365028
Message ID:
01365043
Vues:
16
>".. 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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform