Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Child Classes, the addobject command and dynamic names
Message
De
15/04/1998 15:00:26
Mark Kessler
U.S.M.C. - Network Operation Center
Quantico, Virginie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Child Classes, the addobject command and dynamic names
Divers
Thread ID:
00092230
Message ID:
00092230
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform