Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paging Page Somenumber
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00116970
Message ID:
00120743
Views:
25
Michelle,

>Well, I considered it cheating because I added it to the main subclass. I should probably have subclassed the subclass.

The level where you add it is just a design issue. You add it high enough up the tree where it makes sense to do it. It also doesn't make sense to create too many subclasses because your behaviors fragment too much and it becomes hard if you end up wanting the same behavior in two subtrees that have developed. On the other hand you don't want to create "huge bushpig" (Steve Black's phrase) classes either. Sometimes it's good to use a design pattern to get around some of the design limitations of inheritance.

>That pages[] is handy. Does it still work if I add custom pages? If I can ever get this dang thing to let me do it...

Yes, container classes like PageFrame, Form, Grid, etc. all have collection arrays Pages, Controls and Columns that can be used to iterate through the contained objects. PageFrames can only contain objects derived from the Page class. Increasing PageCount causes instances of Page to be added. To get your custom cPage subclass you have to AddObject() it yourself.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform