Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Members of a parent class cannot be deleted
Message
De
17/01/2008 10:05:37
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
16/01/2008 12:03:56
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01282237
Message ID:
01282561
Vues:
10
>>>>Jay,
>>>>
>>>>The OOP concept here is that if you don't need what is in the class then the object is not a member of that class, it is a member of some other class.
>>>>
>>>>IOW, the item you are wanting to remove probably should not be defined in the class defintion that you are using (because you are using the class and don't want the item).
>>>
>>>Ok, that makes sense. How to handle a situation where you have buttons in the class like Export to Excel, Export to Text, Export to Word, etc., but you find that for the form you are working on, there is never a need for the Export to Word button, but you need all the others and like how they behave?
>>
>>Hide the button or remove it using RemoveObject method.
>
>Isn't that breaking the OOP concept that Jim is talking about?

You could also use a factory object to add the button as required. Basically be a magician and have the form construct itself as required.

Then you keep your classes less complex at design time and let them become complex at run time.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform