>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement