Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: UiEnable Fires even if the page isn't Active
Message
From
29/09/2005 04:32:55
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italy
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: UiEnable Fires even if the page isn't Active
Miscellaneous
Thread ID:
01054366
Message ID:
01054366
Views:
57
Hi All!
I Have a Form with a PageFrame With 4 pages.
In the init of pageframe i add a container on the fly with content of my page.
The uienables events of the objects in the added container are fired. This behavior is in contrast with the help and differ from vfp8.

The below code trace some events creating the form described above, and the resulkt differs from vfp8 and vfp9, in vfp8 i have correctly:

MyPageFrame Init
MyForm Init

In Vfp9 i have

MyPageFrame Init
Text UiEnabled (with lEnabled = .T.)
MyForm Init
Local oForm
Activate Screen
clear
oForm = CreateObject('MyForm')
oForm.Show(1)
Return

Define Class MyForm As Form
	Add Object PF As MyPageFrame
	Autocenter = .T. && Only for read the background screen
	Function Init()
		Activate Screen
		? 'MyForm Init'
	EndFunc
	FUNCTION PF.Init()
		Activate Screen
		? 'MyPageFrame Init'
		This.Page4.AddObject('CntGrid', 'MyCnt')
	EndFunc
EndDefine

Define Class MyPageFrame As PageFrame
	Add Object Page1 As Page
	Add Object Page2 As Page
	Add Object Page3 As Page
	Add Object Page4 As Page
EndDef

Define Class MyCnt As container
	ADD Object Text As MyText
	Visible = .T.  && Deleting this line the uienable don't fire during the init of pageframe
EndDef

Define Class MyText As TextBox
	Function UiEnable(lEnable)
		If lEnable
			Activate Screen
			? 'Text UiEnable'
		EndIf
	ENDFUNC
	
ENDDEFINE
bye, Emanuele!
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.
Next
Reply
Map
View

Click here to load this message in the networking platform