Hi everybody,
I have a commandline tool that should, for test
reasons, load and launch a Cocoa Bundle.
For that purpose I wrote a few C wrapper functions
into the Bundle’s Controller that initialize Cocoa, create NSApp, load the nibfile and so
on.
When started and given the according arguments the
commandlinetool brings up the GUI, but most of the interface elements, namely
NSTextfields, don’t react to typing in text. I can select a textfield, but
there is no reaction to pressing keys. The only interface elements that react
are ones that are I connected to action methods of the controller in
Interfacebuilder. So I can press the quit button, for example.
Instead when I type text it goes to wherever the
commanndline tool is run from, that is the run console, the debugger console or
a terminal.
I know that The Bundle does work, when incorporated
into a Carbon GUI Application.
Now my feeling is, that because there is a no-GUI
application before the GUI is brought up, there is no responder for the events
sent from the window server for the GUI.
If anybody has suggestions on how to resolve this
problem, please let me know.
Thanks,
Sven Hoffmann