Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Differences between :: and DoDefault()
Message
De
24/01/2002 08:49:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00609627
Message ID:
00609636
Vues:
11
This message has been marked as the solution to the initial question of the thread.
>Hi people.
>
>I used :: a lot, but one day I've change the name of my methods and I had to changed all :: that I had in my programs.
>
>After this day, I use DoDefault().
>
>Is there some special motive to use one or another?
>
>[]s

You only need the "scope resolution operator" (::) in the following cases:

1) You need compatibility with VFP 3.

2) You need to call something else than the parent method of the current method. For instance, call the grandparent, bypassing the parent (not recommended, according to other threads here), or call ParentClass::Method2() from ThisClass.Method1().

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform