Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class Management

Status
Not open for further replies.

Scott24x7

Programmer
Jul 12, 2001
2,826
JP
Some of you might have followed recently that built a "quality" check for my page (and yes, page in a page frame).

I decided the best place to put this process was in the Page class, within the Pageframe... but when I went to edit my "Basepageframe" class, I discovered it was filled with "Page" class Pages. I created then a class Pagebase but then discovered, I could not use that in the Basepageframe sub-class because the "Page" was already there (It puts in 2 by default). If I put the code I wanted in the "Refresh" of the Page class, when I add more than the 2 pages that it creates with the class (by increasing the value of Pagecount on the Basepageframe properties), then the "new" pages (or any beyond 2) do not get the inherited elements of Page.

How can I create (or replace) the Page class that's forced in to Pageframe as a base class? I tried to create a new one, but it insists that the Page class is forced into it (at least using the class builder).

Or am I stupid to put this code in the Page refresh, and should put it somewhere else? I decided I didn't want to turn it into a function because of all the complicated parameter passing that would go on with it, and if pages or tab names changed, I didn't want that to create a problem for me later.


Suggestions?
Thanks!

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Pageframe has the MemberClass (and MemberClassLibrary) property for this purpose.

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
 
Ok, but that might as well be Russian... where is it, how do I use it???

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Hope this image helps.
1_qsvs9o.png


P.S. Shamefully I must admit that I can't help you with Russian :)

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
 
Nice that worked, but totally blew up my existing form after... not sure why as it complained about "shapebase" not being valid in the container...
But I'm reworking it, and made a copy of the form (after recovering the old baseclasses so I could even get it open). Then I'll use the new Pageframe to build the form, and copy the fields in from the old one. Hopefully that will get me where I need to be. I remember even "back in the day", that I almost never touched the class library (for existing classes) once they were done, but it's been a while. But this feature that tiny button that only appears when you click on THAT property... that was totaly new to me even after 20+ years of Fox & VFP dev.
-S

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Mike,
Oh man, I hate you. :)

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
You could also do the code in the pageframe and let it act on the pageframe.Pages.

And as a side note you may set pagcount=0 in a base class, if you use the memberclass feature.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top