Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Job interview questions, any suggestions
Message
De
29/02/2000 20:26:10
 
 
À
29/02/2000 20:18:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00339251
Message ID:
00339527
Vues:
26
>I'm still confused about exactly when you need a DoDefault() and when you don't.

Jim Booth wrote an article in the last month or two called "DoDefault(), NODEFAULT, who's got da' fault?" for FoxTalk, good place to start.

>Is the difference in the fact of something being a Method vs. an Event?

Kindof. You use it anywhere you want to inherit code. Say you put code in the Init() event. This code fires when Init() fires, so its pretty much a method, but while blank it doesn't do anyhting. Got that? I think Jim wrote something about this too, where he called them event-methods.

Anyway, in a subclass, you want to do some code in Init(), plus the parent code. Then use DoDefault(). I think you know this. Same thing for User defined methods.

But in a VFP Base class method like Show(), if you put code in there without a DoDefault(), its going to execute that code, and only that code, it probably won't make the form visible. Thats why, if you use Show() like method, you need to include:

DoDefault(nStyle)

too. Make sense?

The NODEFAULT is pretty different though.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform