Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can a Page object init() event not occur???
Message
From
07/01/2009 03:33:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How can a Page object init() event not occur???
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01371589
Message ID:
01371589
Views:
54
Hi,

I intend to create a PageFrame which when drop on a form it starts with ZERO page
Then when I increase its PageCount property from 0 to N (>0), there will be N pages added which are
all based on a page class of mine (instead of the ordinary VFP Page class)
The below is what I have done:
**************************************************
*-- Class:        pagtest (i:\vfp9\work\text.vcx)
*-- ParentClass:  page
*-- BaseClass:    page
*-- Time Stamp:   01/07/09 04:05:14 PM
*
DEFINE CLASS pagtest AS page
	Caption = "Page1"
	Height = 199
	Width = 199
	*-- XML Metadata for customizable properties
	_memberdata = ""
	Name = "pagtest"
ENDDEFINE
*
*-- EndDefine: pagtest
**************************************************


**************************************************
*-- Class:        pgftest (i:\vfp9\work\text.vcx)
*-- ParentClass:  pageframe
*-- BaseClass:    pageframe
*-- Time Stamp:   01/07/09 04:06:14 PM
*
DEFINE CLASS pgftest AS pageframe
	ErasePage = .T.
	MemberClassLibrary = "text.vcx"
	MemberClass = "pagtest"
	PageCount = 0
	ActivePage = 0
	Width = 241
	Height = 169
	*-- XML Metadata for customizable properties
	_memberdata = ""
	Name = "pgftest"
ENDDEFINE
*
*-- EndDefine: pgftest
**************************************************
I then drop an instance the pgftest on a form, increase is PageCount to 2 and run the form.
At first everthing seems OK, until I add codes to the Init() method of the pages.

Whatever custom code that I place in the Init() method of the pages inside that pgftest, say a MessageBox([Hello]), the code simply won't run, as though the initializatoin process simply skip the ini methods of the pages.

Isn't MemberClass property is where I define the default member of the PageFrame?
Would anyone kindly tell me what have I done wrongly?
Next
Reply
Map
View

Click here to load this message in the networking platform