Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclass _base.vcx or redefine _base.vcx to my classes?
Message
De
13/12/2004 11:39:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
13/12/2004 11:20:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00968773
Message ID:
00968782
Vues:
14
>I would like to get some opinions on VFP's _base.vcx. I followed VFP help's advice to redefine _base.vcx to my own base classes but ran into some trouble. Specifically, option groups and page frames.
>
>The problem is that by redefining _base.vcx pageframe or optiongroup, these classes now use my base page and option button controls, thereby losing the _base.vcx properties and methods.
>
>Would I be better off to just subclass the _base.vcx to my base classes rather than redefine _base.vcx? There seems to be some functionality worthwhile in FFC... are there others out there who are using _base.vcx as *your* base controls?

My advice is to just copy from FFC whatever you find usable into your class - method by method, property by property. Not easy to do, and time consuming, but needs to be done only once.

If you keep any reference to FFC, they will break when
- you reinstall Fox to a new machine and the relative path between your classes and the FFC changes
- you install a new version of Fox and uninstall the old one... or, even if you don't uninstall, the reference still points to the old version. The path in the vcx doesn't point to home()+"....\ffc", it has a hardcoded relative path
- you try to share any of these classes with a co-worker who has VFP installed in a different directory

Been there, done that. The best way, if you really want to subclass a FFC class, is to physically copy the FFC classlib into the directory where your classes are, and subclass your classes off that one. That way all of the above pathing issues vanish.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform