Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OOP SHMOOP for icons
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00180474
Message ID:
00180545
Vues:
19
Goodness, I never meant to discourage anyone from OOP! By all means, use subclasses. They've made my life much easier. It's just a wierd quirk that when I set the icon property in the class, the icon was messed up in the forms. This may be a bug, or maybe something wrong with my icon. In general, inheritance works just fine as long as you don't put any code in a method or change a property. That overrides inheritance. Be smart like I wasn't, and put DODEFAULT() before any code you put in any method. You never know when you're going to go back and put code in a method in a class that didn't have code before.

-Michelle


>Ok, I was just joking with my post, but now this is for my education. I've never yet subclassed a class. Just developed 3-4 VFP app's from scratch, with the base classes. I keep intending to make a class library, but "never got around to it". Nor have I "gotten around to" evaluating a framework (or any other class libraries) to use from someone else. Now you've said something which makes me think using anything but the base classes may be a total waste of time.
>
>Are you saying that, when you create a new form from your class, you have to go through each property of the form where your class differs from FoxPro's, and "reset to default"? That seems unfathomably silly if it's true. But it seems that's what you're saying: "every time I make a new form, I've got to remember to reset it to default."
>
>How can it be that, if you define a property in a class, every time you create a new object from that class you have to tell VFP you want it to have the class's properties? If that's true, why would I ever define (or purchase) my own classes, rather than using the base classes forever?
>
>Help me, please! Tell me an object created from a class has that classes properties! Isn't that what inheritance is?
>
>Signed,
>Discouraged in Detroit
>
>>There are a lot of existing forms. And every time I make a new form, I've got to remember to reset it to default. I think I'll try the init idea first.
>>
>>>Not if you only have to go into the existing forms. Your later forms will still benefit from inheriting the icon from the class. And you'll be a better person for recanting your OOP SHMOOP! ;)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform