Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning parameters from form class.
Message
From
15/01/2000 11:34:42
 
 
To
15/01/2000 06:33:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00318514
Message ID:
00318565
Views:
34
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform