From: Jack J. <ja...@or...> - 2001-10-22 10:27:11
|
> While messing around with Tkinter, I'm having similar problems: > > Without adding any MacOSX specific code to Tkinter, the window Tk > creates never responds to anything. I tried adding what I thought was > the relevant code from tkMacOSXAppInit.c(*), and that didn't fix it... > > So, I tried compiling tkMacOSXAppInit.c alone to see if my problems > were in how I was compiling the stuff - basically just did > > cc tkMacOSXAppInit.c -o a.out > > with a lot of -I's and -framework's > > And I got the same behavior! The window did not respond to events! > Which leads me to wonder if I have to make a .app and not a plain > binary. Jim, does that sound correct? Would the application need to > be a .app? My guess is that the application indeed has to be a .app to be able to handle event input. When I tried to put up dialogs from a command-line Python I saw the same thing: the dialogs would show, but they would not react. I asked on the Carbon development mailing list whether (a) there was a way around this, so a commandline tool, could become a first class Aqua citizen or (b) there was a way whereby code could detect whether is was running in a .app or in a command line tool. Unfortunately I received no replies whatsoever. I would be happy if someone here could point me in the right direction... And, Tony, about the specific Tkinter/Python problem: look in Mac/OSX in the Python source tree. There you'll find instructions for creating a Python .app. It's clunky currently, as you really have to create an applet with the .app to be able to run something, but it works as a proof of concept, and it should get your Tk events flowing. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jac...@or... | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm |