From: Max H. <ma...@qu...> - 2001-10-10 13:12:41
|
At 14:14 Uhr +1000 10.10.2001, ni...@in... wrote: [...] > > As for various of the problems mentioned in the README (regarding >> double clicks, intercepting Cmd-key shortcuts etc.), that is because >> the approach you used to hook into the system is not so good for this >> kind of application. A view just doesn't get it all. >> >> The solution usually is to subcalls NSApplication, and provie an own >> sendEvent method. There you can intercept any events you want, and >> pass the ones you are not interested to the original implementation. > > Excellent. I hadn't thought of that. I eagerly await your code! I hacked up something for the keyboard input, and it works quite well! Now what needs to be changed: it should only intercept the keyboard events when the emulator is running and not paused. sadly this is not fully trivial with the current code. What I would like to suggest is that we add a singleton EmulatorManager class that keeps track of the Emulator object (and in future versions, manages multiple). This would be a singleton class, similiar to NSApplication, i.e. you could call [EmulatorManager sharedEmulatorManager] to get the single instance. This would then have some useful methods, like IsAnyEmulatorRunning (i.e. active and not paused) or something alike. Furthermore, it then would have a method to check if the emulator in the current key window is running (and not paused), and if that is true, then we don't intercept key events. As to the mouse events, I still have to look into this; we only want to intercept events that go into the EmulatorView, but ignore the rests (so that the various buttons keep working). BTW, Nigel, how is speed for you? On my G4/400, running Sys 7.5.3 in the emu, I can literally see it do redraws etc. Max P.S.: do you happen to know a Cris Pearson from Tasmania? :) -- ----------------------------------------------- Max Horn Software Developer email: <mailto:ma...@qu...> phone: (+49) 6151-494890 |