Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename a custom property of my class?
Message
De
26/03/2009 11:00:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
26/03/2009 09:41:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01391579
Message ID:
01391609
Vues:
55
>Is there any way I can rename a property on my base form class so that it will not break all the forms based on that class that have overridden that property?
>
>I have a custom property named "form_title" that I wish I had named "cFormTitle", but every SCX form already has that property set to a value, and if I rename the property in my base class, won't that break the SCX file, as far as losing the value of that property?
>
>I know I can use the Code Refences to address the use of that property name in method code, but what about the issue of the property name/ value that I have set on each form SCX?

You can simply add the new property, and then either write a simple builder to visit all the cases when this class was subclassed or used as a member somewhere, or add some code to the class to check whether new is not changed but old is, then copy value from old (maybe a new_property_access?). Or do the 2nd to hold the fort until you're done with 1st.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform