From: Jack J. <ja...@or...> - 2001-10-22 19:25:56
|
Recently, Jim Ingham <ji...@ap...> said: > > 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 don't think this is a correct guess. Most of the Carbon PEF > applications that run on X don't come in App packages. And there are > several command line utilities on X that use Carbon for UI, either to > put up warning dialogs (some of the installer stuff does this) or to put > up Authorization panels. > > My guess is you are being bitten by Carbon's not playing very nicely in > a threaded environment (IIRC, Python uses multiple threads). Ah, this is *very* useful information, it'll undoubtedly save me a lot of work in the future. But: I don't think this is the problem right now, at least, if I read your message correctly (only call RNE in the thread that loaded Carbon). First, Python isn't multithreaded internally, so if you don't start threads there's only the main thread. Second, Tony reported that a standalone cc tkMacOSXAppInit.c -o a.out exhibited the same problems. So, if it's not the .app that is the problem there is something else that needs to be done before you can use events, and that both Python and this simple test program don't do. -- 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 |