Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent abuse
Message
From
24/01/2000 00:09:07
 
 
To
23/01/2000 23:08:41
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00321381
Message ID:
00321535
Views:
15
>I just read your response to Mike, and saw that this solution caused a GPF. I think this is due to the fact that maybe this isn't allowed. You shouldn't be able to kill your parents.

But it does work for me, you can verify this by running this code from the command window and watching the form controlcount int he debugger:
public oTest
oTest = createobject("remobj")
oTest.Show()
DEFINE CLASS obj AS container


	Width = 145
	Height = 159
	Name = "obj"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 6, ;
		Left = 6, ;
		Height = 144, ;
		Width = 132, ;
		Caption = "Remove Parent", ;
		Name = "Command1"


	PROCEDURE command1.Click
		this.parent.visible = .f.
		this.parent.parent.removeobject(this.parent.name)
	ENDPROC


ENDDEFINE
DEFINE CLASS remobj AS form


	Top = 0
	Left = 0
	Height = 185
	Width = 172
	DoCreate = .T.
	Caption = "Form2"
	Name = "remobj"


	ADD OBJECT obj1 AS obj WITH ;
		Top = 12, ;
		Left = 12, ;
		Name = "Obj1", ;
		Command1.Name = "Command1"


ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform