Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual class design and member classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00774329
Message ID:
00774372
Views:
12
Rodd,

I've just performed the following test:
1) In a fresh instance of VFP 8, created TEST.VCX, an empty classlib
2) Opened the TEST classlib and, in that classlib, subclassed the Page and PageFrame base classes into pagTest and pgfTest, respectively
3) Opened the pagTest class and altered the caption of the pagTest class to read "MyTestPage1"
4) Added a property to the same pagTest class called "icTestProperty"
5) Saved the pagTest class, opened the pgfTest class and, using the button as you described, modified the MemberClass property to use the pagTest Page class, answering "Yes" to the override question
6) Saved the pgfTest class, cleaned up the class library and exited VFP
7) Restarted VFP 8, opened the TEST classlib, opened the pgfTest PageFrame class, edited the PageFrame and selected both default pages individually.

RESULT: both default pages had the desired inheritance, the correct caption and the added property. IOW -- no problem at all.

Garrett: I did this on a Toshiba Satellite notebook running WinXP Home which had the public beta installed prior to the RTM version. However, I uninstalled the beta before installing the RTM.

Rodd: Try that exact same operation. If the test works (ie, you don't have the problem), I'd try manually rebuilding the class library which contains the classes you're dealing with. If the test above DOESN'T work, I'd reinstall VFP 8, 'cause something's scrambled somewhere.

Another thought: could the classlib (or the associated VCT) be marked read-only, by chance???

Keep us posted -- I'm *really* curious how this one shakes out.


>Hey Evan,
>
>Thanks for your input. However, I subclass a PageFrame from the VFP base. I click on the ... button to change the memberclass property. It gives me the message you're referring to and I answer Yes, destroy everything and use my new memberclass. I choose my new memberclass and it and it's library appear in my memberclass and memberclasslibrary properties. At this point everything is great.
>
>However, if I save that PageFrame and open it back up, voila, there are the 2 default pages back where they were. Same if I don't open it back up but rather try to drop that pageframe on a form. Now, if I up the number of pages, all the new pages show up as my Page class but those first two just stay there and haunt me.
>
>Any suggestions?
>
>Rodd
>
>>Hi Rodd,
>>
>>When you attempt to set the MemberClass and/or MemberClassLibrary properties of the PageFrame in the property sheet of the PageFrame, you should be prompted whether you want to destroy the existing member classes. If you agree to do this, the two contained pages should inherit from your chosen page class along with any added pages.
>>
>>If you don't get this prompt, then there's another problem...
>>
>>HTH.
>>
>>>I'm trying to create a wizard class in VFP 8.0.
>>>
>>>I began by subclassing a Page class and adding the properties and methods that I wanted.
>>>
>>>However, as I try to implement my new Page class as the member class of a PageFrame, I find that I can never get rid of the 2 initial pages that are from the VFP base class.
>>>
>>>The problem is that our whole development team will be using this wizard class (once it's finished). It seems a bit clunky to tell them, "If you need 5 pages for your wizard, then set the PageFrame's pages to 7 and don't use the first 2 pages of the page frame."
>>>
>>>Is there a way to ensure that all the pages of a PageFrame will be from my Page class ... even at design time!
>>>
>>>(I do realize I can remove the first two pages at runtime, but like I said, that could cause problems too if a developer doesn't realize the pages will be deleted as he's designing his form.)
>>>
>>>Thanks for your help!
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform