Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class creation off of a parent class. Name problems
Message
From
15/04/1998 08:41:09
 
 
To
15/04/1998 08:19:25
Mark Kessler
U.S.M.C. - Network Operation Center
Quantico, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00092086
Message ID:
00092095
Views:
21
>I created a class off of the class page. The problem is that when I use an addobject command I can't seem to use a variable to give it a name.
>
>Example.
>
>DEFINE CLASS mypage AS Page
> Visible = .T.
> PROCEDURE Click
> ...
> ENDPROC
>ENDDEFINE
>
>itemp = str(thisform.pageframe.activepage)
>var1 = "Page" + itemp
>
>thisform.pageframe1.addobject(var1, 'mypage')
>
>
>The reason bhind this is to keep creating a pagename with a higher number... so that no two page objects have the same name.
>
>Does anyone know how to create new pages useing the new class above and would give it a unique name?
>
>I need to keep the pages dynamic.

Mark,

Try this instead:

WITH THISFORM.PageFrame1
lcNextPage = ALLTRIM(STR(.PageCount+1))
.AddObject(lcNextPage, 'MyPage')
ENDWITH

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform