Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a form class to recognize who created it.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00032163
Message ID:
00032685
Vues:
32
>I have a custom class that needs to trap some input from a form dialog. The custom object creates the form object and displays it via oform.Show(). The form has typical OK and Cancel buttons but when trying to set a property in the custom class, I cannot seem to get the form to reference the custom object. I've worked much with passing a reference of the custom class to the dialog form and although TYPE() returns an "O", I continually get an error message about WITH/ENDWITH. The custom class gets added to a container which has other controls on it and is added to a form. This custom class should be able to be put in any for or container so a generic reference to it needs to be recognized by the dialog form.
>
>What am I missing here.
>
>Steve Despres
>EZ Data Inc.

Steve,
Launch your form from a method of the custom class and in that class do this;

LOCAL loTemp
loTemp = Createobject("FormClassName",THIS)

In the init of the form class do this;

LPARAMETERS poCreator
THISFORM.oCreator = poCreator
* oCreator is a custom property of this form class

then you can refer to the custom class from inside of the fomr with THISFORM.oCreator

Be sure the form class is modal.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform