Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning value from Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00158041
Message ID:
00158481
Views:
18
Michael,

>David, so your saying in the UNLOAD event I should be able to return 'something' from the form class unload event. I tried to return anything but only a logical true was passed back.

Yes, you can return this.SomeFormProperty in the Unload event.

I just created a form, dropped a textbox on it, bound the textbox to thisform.Tag.

do form modal1 to x1
? x1 && prints out whatever was typed in the textbox

Here's the classbrowser output for the form:
PUBLIC oform1

oform1=CREATEOBJECT("form1")
oform1.Show
RETURN

**************************************************
*-- Form:         form1 (e:\vfp5app\misc\modal1.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	WindowType = 1
	Name = "Form1"

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "thisform.tag", ;
		Left = 34, ;
		Top = 24, ;
		Width = 297, ;
		Name = "Text1"

	PROCEDURE Unload
		return this.Tag
	ENDPROC
ENDDEFINE
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform