Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any VFP's FormCount equivalent in VB?
Message
 
À
15/09/2000 22:34:15
Marlou Gargantos
Independent Consultant
Manila, Philippines
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00414092
Message ID:
00417277
Vues:
28
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You do less cut and paste in a tool that supports subclassing and inheritance. In this case VB sucks, but hoping for the next version though.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Wait, wait, wait. Let's return to the initial point, because I think it is important if you really want to learn how to use VB. You asked for a way to check for any open child forms. I provided a function. You said thanks, and commented that you are doing an awful lot of cutting and pasting in VB because there's no inheritance.... My point is this -- without inheritance, you might well need to cut and paste quite a bit. *Or* you can design your objects and apps to take advantage of resuable code through composition techniques, rather than inheritance. If you provide concrete examples, I am happy to help. I am not saying that you can accomplish everything that you can through inheritance, but you can accomplish an awful lot.... if you are cutting and pasting so much, you might be missing something.

I don't mean to keep flogging a dead horse on this. Listen, I use VFP all the time (I co-authored a QUE book on it, in fact). I agree that there are times where inheritance is irreplaceable. But, I fear that many people move to VB from VFP or Java, and because they can't inherit in the strict sense, they decide "VB sucks" (your quote) and begin cutting and pasting too much. I have watched folks begin a VB project and go WAAAAYYYYY awry because they decided "can't inherit, therefore can't re-use." That's just not true.

Have you worked with the Implements keyword? Multi-casting? Delegation design? Composition? (I would also argue that inheritance is used too much by most VFP and Java programmers, and even in those languages the careful use of delegation/composition would create better, less memory-intensive, and more extensible apps. But that's for another board.)

Imagine how you would feel if a VB programmer looked at VFP and said "you can't Implement? Or god, you can't reuse code in this stupid language! Oh well, maybe in VFP 7..." and began cutting and pasting and posting comments that this was the only way to work in VFP. He'd sound pretty silly, wouldn't he?
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform