>In my first subclass of a base class, can I always execute the method code there ?
>Let's say in a grid, I have my Init event code, that must be executed. When another developer places code in the Init event of the subclassed object, they must use dodefault() or my code is not executed. Is there a way to force my code to be executed, unless a NODEFAULT is placed in the object ?
Yes, one method that I use is like this. It mostly consists of using hooks.
In a situation like this, when you want to avoid having to remember to put DODEFAULT(), using hooks may do the job.
1. In your object, create a method like OurInit()
2. In your object Init(), in the appropriate place, call This.OurInit()
3. In your form, if init code should be handled, place it in OurInit()