Question

When I run my Irrlicht application in Xcode, I can't use keyboard input:

If I press a key while the application is running, I end up writing that letter on whichever window was opened before the application, for example: I'm editing my code, than I press Build/run, the application opens (I press with the mouse on the window just to make sure it is focused) and than I press a key and that letter is written in the editor window...

I am certain the problem is not from the code, because if I press the top bar of the application's window, press the key, and release the mouse button (in a fast motion) the event gets fired..

Now, from what I read in this link (fourth post), it seems there's an incompatibility between command-line application with Xcode and irrlicht. The guy changed to a Cocoa application and got it to work. I don't know how to do this, since Irrlicht uses lots of namespaces and with cocoa I get loads of problems with it..

Any idea? thanks!

Was it helpful?

Solution

Well after a random search i found this guide:

http://irrlicht.sourceforge.net/forum/viewtopic.php?f=5&t=13890&start=60

Some things were different with my Xcode 3.2.6 (e.g. i had no *AppDelegate.m, *AppDelegate.h nor *.xib file) but easy to get to the end of the tutorial.

In the end i got like 1000 errors, something to do with precompile appkit.h errors, and with a quick search here is the solution for all those errors:

http://www.cocoabuilder.com/archive/cocoa/194905-xcode-cocoa-project-with.html#195211

easy peasy :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top