Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: Pagecount=N can add N pages with duplicated names
Message
From
29/09/2005 05:23:54
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: Pagecount=N can add N pages with duplicated names
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01054372
Message ID:
01054372
Views:
53
Expected: pagecount set the total number of Pageframe's member pages

Repro:
- run
- a class start with a page via ADD OBJECT
- pagecount is set to 1
- result pagecount become 2
and the pageframe becomes incoherent
clear
PUBLIC oform1

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

DEFINE CLASS form1 AS form
	autocenter = .t.
	
	ADD OBJECT pageframe1 AS pframe WITH ;
		Top = 28, ;
		Left = 46, ;
		Width = 290, ;
		Height = 188,;
		pagecount = 1	&& this mean PageAdd 

	PROCEDURE pageframe1.Init
		? "Pagecount is",this.Pagecount

		? "Now two members with same name !"
		FOR K=1 TO this.Pagecount
			? "member",k,"Name is ",this.pages[k].name
		NEXT
		? "AMEMBERS Objects Sort names and then return only one name",AMEMBERS(AX,THIS,2)
		
		? "VFP search a member name in reverse order and Page1 caption is ",THIS.PAGE1.Caption
		?
		? "Now rename the page1"
		THIS.PAGE1.name = "pagerename"
		? "now first page appear"
		? "Page1 caption is ",THIS.PAGE1.Caption
		? "finally a VFP routine check the name collision"
		ON ERROR ? MESSAGE()
		THIS.PAGE1.name = "pagerename"
ENDDEFINE

DEFINE CLASS pframe as PageFrame 

	ADD OBJECT Page1 as Page WITH ;
		caption="ADD OBJECT"

ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform