Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing classes in an existing application
Message
De
30/10/2001 08:10:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
30/10/2001 07:55:30
Dennis Little
Ist Choice Travel
Glos, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00574943
Message ID:
00574948
Vues:
18
>Have come across an ancient application whereby none of the base classes were subclassed.
>
>I remember reading somewhere of a technique whereby you could effectively subclass the original 'textbox', 'listbox', etc, classes without replacing them in the forms.
>
>Could anyone advise please?
>
>TIA
>
>Dennis

I haven't read anything, but I suppose you could open the metafiles:
use MyForm.scx
and then do some REPLACE:
replace class with "cTextBox", classloc with "MyDerivedClasses.vcx";
  for lower(class) = "textbox"
Repeat for other base classes. Repeat in a loop for all forms and form classes.

CAUTION: Make backup first. Replacing metadata can lead to unexpected results sometimes.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform