Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differences between :: and DoDefault()
Message
From
24/01/2002 08:49:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00609627
Message ID:
00609636
Views:
16
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform