Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: UiEnable Fires even if the page isn't Active
Message
De
29/09/2005 07:55:12
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italie
 
 
À
29/09/2005 04:32:55
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italie
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
01054366
Message ID:
01054411
Vues:
18
New News ... Bad News .....

I discovered that the behavior is different inside of VFP9 (I don't know the behavior with SP1 Beta) if i add container in the pages on the fly or on the class definition.

1) If i define a page class with the container and i add this page in the definition of pageframe the uienables of container's objects don't fire if the page is hidden =Inactive (OK)

2) If i add container on fly, UIENABLE of the container's objects, will fire even if the parent page of container is inactive (BUG)

3) If i have 1) + 2) the container added on the fly have some influence on the container that yet exists and the uienable of both containers's objects will fire ...

With VFp8 no one uienable is fired if the pages is inactive

My english is "Orridus" 8) .. so i have a little program that explain my Hugly words:
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.Page3.AddObject('CntGrid', 'MyCnt') && This will fire Uienble in the text of Mycnt
		This.Page5.AddObject('CntGrid', 'MyCnt') && This will fire Uienble in the text of Mycnt And 
	                                             && in The text of "cnt" that yet exists in class MyPage (Page5)
	EndFunc
EndDefine

Define Class MyPage As Page
	Add Object cnt As Mycnt
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 MyPage && Page4 don't fire uienable creating it
	Add Object Page5 As MyPage
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 (' + This.Parent.Parent.Name + ')'
		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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform