>First, in your example, a simple comment line would suffice. In fact any class utilizing BindEvent() should be well documented for obvious reasons.
The class using BindEvent() is rarely the class that raises the event.
> Your propostion severely restricts the use of BindEvent()
Fair enough. Then go back to Message#
971928 and respond with the types of uses you have in mind.
The only real exception is when binding to properties. Obviouslly there is no need for a RaiseEvent().
>and I don't think the VFPT designed BindEvent() with this type of restriction in mind.
Actually they did. In the VFP 8.0 Beta
BindEvent(o1, "m1", o2, "m2")
was identical to what is now
BindEvent(o1, "m1", o2, "m2", 2)
.
Before it went into production the use of the nFlag=2 was switched, presumably because beta testers asked for it not understanding how loosely coupled events should be put to use in object systems.