Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiation of an object
Message
De
02/12/2008 07:34:50
 
 
À
02/12/2008 06:23:44
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:
01365063
Vues:
12
Derek,

please read your initial question of this thread especially the first paragraph (quoted below),

>> Here's a quick question regarding class library instantiation. I have a class library called MyClass.vcx, which has several objects within it
>>(including forms) - I use the command goMyClass = createobject('MyClass') to instantiate the object, but the question is this:

this paragraph contains some "syntax errors" and obvious misunderstandings which have misslead Agnes and me and maybe others as well.

"...library called MyClass.vcx..." and "creatobject("MyClass")" used in the same sentence with "...class library instantiation..." is very weird. This sentence and your comments make someone believe, that you might think, you can "instantiate" a whole classlib with one single native VFP command. => classlib: MyClass.vcx -> createobject("MyClass")!!

Even if this paragraph would make sense, it has actually nothing to do with your real question.


>When using the reference to show forms within the class library, which is the correct method to fire so that the form runs as though it were >being run in standalone, i.e. all the methods are run in the correct order. As an example, I use =goMyClass.myForm.Show(), but is this the >correct method to use?

Even this paragraph contains some elements, that makes it hard to understand or to answer.

If your object "goMyClass" provides a property named "myForm" and this property already contains a refrence to an already instantiated formobject, the answer would be: Yes, "goMyClass.myForm.Show()" would be correct to make this form visible, regardless of which classlibrary the classdefinition of the form was originally taken from.

> I never said it was a native VFP command nor did I say that it was a single command either.

you did, see top of this message or your original posting.
Holger Vorberg
Germany
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform