Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child Classes, the addobject command and dynamic names
Message
From
15/04/1998 15:00:26
Mark Kessler
U.S.M.C. - Network Operation Center
Quantico, Virginia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Child Classes, the addobject command and dynamic names
Miscellaneous
Thread ID:
00092230
Message ID:
00092230
Views:
65
I have created a child class off of the class PAGE. I then wanted my program to automatically create the new pages as needed, but I need the page names to be different from each other.

Example:

DEFINE CLASS mypage AS Page && Creates a Child of PAGE
Visible = .T.
PROCEDURE Click
...[code]...
ENDPROC
ENDDEFINE

******* Addobject test1.*****
tt = "PAGE"+STR(thisform.pageframe1.PageCount+1)
thisform.pageframe1.addobject(tt, 'mypage')
&& it gives the error: Not property of...

******* Addobject test2 (Code read from thread) *****
WITH THISFORM.PageFrame1
lcNextPage = ALLTRIM(STR(.PageCount+1))
.addobject(lcNextPage, 'MyPage')
ENDWITH
&& this gives me a syntax error

What can I do to create a new page with unique name dynamically?
Mark Kessler
USMC Network Operation Center
Next
Reply
Map
View

Click here to load this message in the networking platform