Torque window sucks up all events.
by Steve Lamperti · in Torque Game Engine · 01/28/2004 (11:23 am) · 8 replies
I've got Torque opening up as a seperate window in my application. The window pops up, you can use it, and then close it, and then you are supposed to be able to continue on your merry way. On windows this is working fine, but on the Mac, I am having an event processing problem. I'm not that familiar with the Carbon Event processing stuff. (Our event processing in our app is still not using the new carbon calls.)
What happens is that all the events (Mouse clicks, keyboard, and so on,) seem to be being intercepted by the foreground Torque window, and the applications event processing stuff never gets a chance to process anything. One of the first symptoms of this is that I can't switch from the torque window to any other windows that I have open from the application.
I'm tried commenting out the Installation of the application level event processing code in MacCarbWindow.cc, but this doesn't seem to help.
On windows the way I resolved this was to change the type of window that the Torque code was creating, but On the Mac I am having no luck so far.
If anyone has any suggestions as to what I may need to change in the code, I would appreciate hearing them.
I know I haven't given a very complete description of the situation here, but if anyone has any clues, and need additional info, I would be glad to provide it.
Thanks.
What happens is that all the events (Mouse clicks, keyboard, and so on,) seem to be being intercepted by the foreground Torque window, and the applications event processing stuff never gets a chance to process anything. One of the first symptoms of this is that I can't switch from the torque window to any other windows that I have open from the application.
I'm tried commenting out the Installation of the application level event processing code in MacCarbWindow.cc, but this doesn't seem to help.
On windows the way I resolved this was to change the type of window that the Torque code was creating, but On the Mac I am having no luck so far.
If anyone has any suggestions as to what I may need to change in the code, I would appreciate hearing them.
I know I haven't given a very complete description of the situation here, but if anyone has any clues, and need additional info, I would be glad to provide it.
Thanks.
#2
I do still have this issue. I've been doing most of my development on the windows side, so this problem is not in my face every day, and I've been putting it off. Did you have any suggestions? If you need any more info about what I'm doing, let me know.
03/18/2004 (8:19 am)
David,I do still have this issue. I've been doing most of my development on the windows side, so this problem is not in my face every day, and I've been putting it off. Did you have any suggestions? If you need any more info about what I'm doing, let me know.
#3
Does anybody still have this issue with the Carbon event loop sucking up all events? I think I'm having this problem too because I'm embedding another Carbon based app into Torque and it's not working properly.
01/03/2008 (1:17 pm)
Hello,Does anybody still have this issue with the Carbon event loop sucking up all events? I think I'm having this problem too because I'm embedding another Carbon based app into Torque and it's not working properly.
#4
I have resolved the issue I had. I don't think that my code will help anyone else, because I am doing some very custom stuff, but basically I had to juggle the events between the torque window, and the rest of my app. (I.e. my app would receive an event, and I had to think about which window was the front window, and vice versa.)
01/03/2008 (2:38 pm)
Igor,I have resolved the issue I had. I don't think that my code will help anyone else, because I am doing some very custom stuff, but basically I had to juggle the events between the torque window, and the rest of my app. (I.e. my app would receive an event, and I had to think about which window was the front window, and vice versa.)
#5
Thanks for the reply. I'm fairly new to Mac development, and don't exactly understand Carbon events 100%, so I'm not very sure exactly where to start looking. As you wrote earlier in your posts, I had also tried removing all the application event handlers with no success. I am not sure where to start looking or where to modify my code. Can you suggest a few areas in the code or pointers to where I can start?
Thanks!
01/04/2008 (4:50 am)
Hi Steve,Thanks for the reply. I'm fairly new to Mac development, and don't exactly understand Carbon events 100%, so I'm not very sure exactly where to start looking. As you wrote earlier in your posts, I had also tried removing all the application event handlers with no success. I am not sure where to start looking or where to modify my code. Can you suggest a few areas in the code or pointers to where I can start?
Thanks!
#6
My project is still using carbon, but yours probably isn't. Carbon is the glue development system that apple supported to help people transition from 68K machines to PPC machines. This is part of why I don't have much advice to offer. My code base is pretty obsolete.
01/04/2008 (9:26 am)
Igor,My project is still using carbon, but yours probably isn't. Carbon is the glue development system that apple supported to help people transition from 68K machines to PPC machines. This is part of why I don't have much advice to offer. My code base is pretty obsolete.
#7
Contrary to your statement, my embedded app is actually using Carbon framework, and Torque I know is also using Carbon but Torque doesn't play well with Carbon.
I found that if I call RunApplicationEventLoop() after my embedded app and after Torque is startup, my embedded app starts receiving events and works properly, but then breaks Torque (of course).
I think Torque installs some handlers that captures every event and starves my embedded app. But when RunApplicationEventLoop() is called, it reinstalls certain apple event handlers and passes those events Torque stole back to my embedded app.
Any suggestions or ideas?
Thanks!
01/04/2008 (9:38 am)
Hi Steve,Contrary to your statement, my embedded app is actually using Carbon framework, and Torque I know is also using Carbon but Torque doesn't play well with Carbon.
I found that if I call RunApplicationEventLoop() after my embedded app and after Torque is startup, my embedded app starts receiving events and works properly, but then breaks Torque (of course).
I think Torque installs some handlers that captures every event and starves my embedded app. But when RunApplicationEventLoop() is called, it reinstalls certain apple event handlers and passes those events Torque stole back to my embedded app.
Any suggestions or ideas?
Thanks!
#8
After looking at my code. (I worked on this a while ago, and don't remember a thing.) I find that I seem to be not installing the Torque event handlers at all, and instead I have constructed my own event queuing where I keep a list of events that my event handlers get that should go to the torque window, and I feed them to the event engine.
01/04/2008 (10:07 am)
Igor,After looking at my code. (I worked on this a while ago, and don't remember a thing.) I find that I seem to be not installing the Torque event handlers at all, and instead I have constructed my own event queuing where I keep a list of events that my event handlers get that should go to the torque window, and I feed them to the event engine.
Torque Owner David Chait
-d