Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning parameters from form class.
Message
De
15/01/2000 11:34:42
 
 
À
15/01/2000 06:33:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00318514
Message ID:
00318565
Vues:
33
Any object that creates another object can pass itself as a reference via a parameter. Then, in the new object, you can store the reference as a property and access the first object's properties directly.

In example, oForm1 creates oForm2:

oForm2=CREATEOBJECT({formclass}, this)

In the oForm2.Init, store a reference in a property (use TAG in example)

LPARAMETER toFormThatCalledMe

ThisForm.Tag = toFormThatCalledMe


So, now you can reference everything in oForm1 by refering to ThisForm.Tag. In this manner you do not have to worry about passing values back to a form.

Hope this helps.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform