"Doug Turner" <[EMAIL PROTECTED]> wrote in message news:akejec$[EMAIL PROTECTED]... > I want to freeze an interface which will allow a simply timers mechanism > in Mozilla. The nsIScriptableTimer interface does exactly what is > required. The only draw back is that one must implement an nsIObserver > interface to receive the timer notification. (There is no method on > this interface that takes a function pointer). I kind of like this from > the oo standpoint, but wanted to get a feel for what others think. I > haven�t found any place in the Mozilla code where that would be > extremely hard to do, so I doubt that this would be major problem for > most embedders. > > Please consider this interface and add any comments to bug 157136. > > Doug Turner > [EMAIL PROTECTED] > >
IMHO you should freeze it as it is. OO should always be the way to go, especialy when the name of the interafce suggest that it will be used from JS, where you don't have the ability to pass fucntion pointers. I don't see how passing a function pointer is much easier for the experiened C++ programer, while for a novice one it introduces so many opertunities to make mistakes. Mark.
