Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Dockable=1 activate the form before the load event
Message
From
02/10/2005 13:24:22
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: Dockable=1 activate the form before the load event
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01055356
Message ID:
01055356
Views:
37
Expected: _SCREEN.ActiveForm is set after the Show call

Observed: for a Dockable form this is not true.
someform=CREATEOBJECT("someform")
someform.show
READ EVENTS

DEFINE CLASS someform as form

	PROCEDURE click
		=CREATEOBJECT("dockable")

	PROCEDURE lostFocus
		? "someform lostfocus"

	PROCEDURE gotFocus
		? "someform gotfocus"

	PROCEDURE unload
		CLEAR EVENTS
ENDDEFINE

DEFINE CLASS dockable as form
	dockable = 1

	PROCEDURE load
		&& this form is Active still before being built !
		? "Active form is",_screen.ActiveForm.Name, "    expected : Someform"
		&& this change the ActiveForm ! It shouldn't.
		this.dockable = 0
		? "Active form is", _screen.ActiveForm.Name
		RETURN .f.
		* and although the form is not built, someform has a cycle deactivate/activate
	ENDPROC
ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform