Using IDLitWindow::AddWindowEventObserver [message #77981] |
Thu, 13 October 2011 00:11 |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
Hi all,
I'm trying to write a program where one top-level widget base will contain several Object Graphics windows, using my own window class subclassing from IDLitWindow, with my own handlers for mouse and keyboard events. I want to provide the *option* of linking the windows so that these events can be received by one window and broadcast to the others for synchronized zooming/panning/etc.
I've read every word I can find about this in online help (it didn't take long, see IDLitWindow Methods) and I'm quite sure I've done this right, creating another class of observer object which is added using AddWindowEventObserver (and I'd remove them when I want to turn off linking). Now, the events are indeed coming to the window that I do the actual event on (OnWheel is called, for instance), but nothing else seems to happen. The methods on the observer objects (I have an OnWheel handler as described) never seem to be called at all. Am I wrong to expect that I'd get the original event method call on the first window and the method calls to all added observers as well?
The animate_doc code has a simpler observer idea, where no method is catching the original timer events.
Has anyone else got this kind of thing working? (Michael, does your book cover this? :-)
|
|
|