Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-Classes / DoDefault()
Message
De
24/10/2001 08:54:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00572362
Message ID:
00572541
Vues:
30
>Ahh sorry for mis-understanding, but yes to which one?
>I put forward two possibilities.

Was yes to 'I know in the Debugger it will jump straight to the MyFormClass, but internally is this what it does?' :)

dodefault() is a command introduced in VFP5 and correspond to scope resolutor :
parentclass::thismethod

If a method code is empty in a subclass then it practically means 'default' which is the first nonempty class code in hierarchy. Then it stops executing there (non built-in).
Built-in methods, events has implicit execution of their default action unless you include 'nodefault'.

"If MyForm.MyMethod is blank
But MyFormClass.MyForm has code like
LPARAMETER oMyObj
this.oProp = m.oMyObj

If I call MyForm.MyMethod, will Foxpro internally go to MyForm.MyMethod see there is no code and call a DoDefault() or will it just jump straight to the MyFormClass.MyMethod"

From technical insight I don't know how exactly VFP does that and really don't bother. All I need to know is that if a class code is empty it does an implicit 'dodefaulting'.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform