Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug/Bad Behavior SubClassing, How to Corrupt a class!
Message
De
30/06/2004 14:03:15
 
 
À
30/06/2004 13:38:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00919001
Message ID:
00919210
Vues:
11
Thanks for the info Tom. I'll have to test it when I get home because I don't have VFP9 beta installed at work yet....

>Tracy,
>
>>This would be a problem for me if pagenames were not modifiable. Hopefully it only has to do with subclassing perhaps? I have not experienced this error yet. I create forms that have more than 20 pages but the actual pages displayed to the user are determined on the fly - typically only 5 or so. In the init of the form I call a form method that changes the pagenames that are displayed to the user to match the current order of the pages so code in my keypress event will always run correctly. I do this so I can set focus to the correct page and control on the page when the user presses the pageup or pagedown keys, etc.
>
>Open up the VCX of a class where you only overwrite some properties on objects aggregated in the parentclass. If you look at the properties memo field you will see some reason to be afraid of changing names afterwards <g>. It does pose some problems, if you have existing app's and try to slip pages as leaf classes "under". I sometimes succeed by hacking the ?cx files (If you do this in the IDE all your properties are GONE after fair warning <g>), but it is so much trouble I usually work around it by eventbinding or adding properties in the Init. The methods for this can be subclassed, and I am also at least a quarter OO. For new projects (if you are into pageframes) add a leaf class into your pgfbase classes. Then it is quite easy to insert new superclasses. The other ways are ... interesting <bg>.
>
>All and all I like to be able to try out these things - you fix a lot of things by doing some dirty work. Still, it is more dangerous: backup and/or SourceSafe can be mighty useful...
>
>rgds
>
>thomas
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform