From: Ashley W. <as...@dc...> - 2002-01-02 20:35:21
|
on 31/12/01 8:14 PM, Jim Ingham at ji...@ap... wrote: >> on 25/12/01 7:04 pm, Tony Lownds at to...@me... wrote: >>> At 7:24 PM +0000 12/21/01, Ashley Ward wrote: >>>> When I run my application, I now get a partially-drawn interface windo= w, >>>> but >>>> then it hangs. I can use gdb to generate a backtrace: >>>> [...] >>>> I suspect that perhaps I'm getting the Tcl/Tk initialisation wrong. I= 've >>>> had a look at tkMacOSXAppInit.c from the macosx-8-4-branch on CVS and = have >>>> copied a few likely-looking things into my Tcl_AppInit() and main(). = In >>>> particular, I've added TkMacOSXInitAppleEvents(interp); and >>>> TkMacOSXInitMenus(interp); to Tcl_AppInit() (which doesn't seem to hav= e any >>>> effect) and tried adding Tk_MacOSXSetupTkNotifier(); to main(), which = then >>>> causes a similar but deeper hang earlier on (not in the call to >>>> Tk_MacOSXSetupTkNotifier()). >>>=20 >>> I think you are not doing the call to Tk_MacOSXSetupTkNotifier early >>> enough. Call it before ALL other Tcl_* or Tk_* functions. >>>=20 >>> -Tony >>=20 >> [...] >> started it from. When I click in the app's window to bring it to the fr= ont >> in an attempt to use it, I get this message from tkMacOSXMouseEvent.c:24= 1 >> (the function TkMacOSXProcessMouseEvent) on stderr: >>=20 >> SetFrontProcess failed,-600 >> [...] >> Any ideas why SetFrontProcess would fail in this way? >>=20 >> Also I can't seem to compile Tcl or Tk from the code I obtained from CVS= . >> I'm using Project Builder, with the Wish.pbproj. Trying to compile the >> TkLibrary target gives me an error when linking: "Undefined symbols: >> _Tcl_MacOSXOpenBundleResources". Apologies -- it's probably a newbie >> mistake with Project Builder. If anyone could point out where I've gone >> wrong, I'd appreciate it as building Tk myself might help in debugging m= y >> app. >>=20 > How recently have you updated your Tcl/Tk sources? I made some changes > (moving the routine you aren't finding from Tk to Tcl, where it more > properly belongs). But I forgot to check in one of the subdirectories, s= o > the Makefiles didn't get updated. You need to update all the Tcl & Tk > trees,=20 I've just cd'd into my tk and tcl directories and done a 'cvs update', but CVS didn't seem to do anything (it just said "Updating" on every directory name). I did "update to latest version" in Project Builder, and compiled TkLibrary again, but still got the error: ld: Undefined symbols: _Tcl_MacOSXOpenBundleResources >and, since there were changes to configure & Makefile.in, you need to > rerun configure and rebuild. I did 'clean active target' in Project Builder before compiling. Hmmm... "rerun configure and rebuild"... is it possible to compile it without using Project Builder now? I remember reading a post from Jim that said the UNIX makefiles hadn't been done. > Sorry for the trouble. No problem -- think we're getting there :) > There is a patch in the Tk sourceforge Patch Manager to move the > SetupTkNotifier, and a bunch of other miscellaneous junk, into the TkpIni= t > routine so that you don=B9t have to do anything but call Tk_Init, and you w= ill > be done. I need to clean it up (the style is not kosher, the contents ar= e > great), and check it in. I am still on vacation, but I will get to this > this weekend... That sounds good. Don't work too hard, though :) > I need to chase down the SetFrontProcess thing. This call usually succee= ds, > but there is some glitch that causes it to occasionally fail. It doesn't > seem to be harmful, however, so I haven't looked into it further. It always fails with my app. And as it fails, I can't give the app focus and so I can't interact with it. A fairly major problem :( Thanks for the reply. > Jim Ash. --=20 Ashley Ward - Graduate Teaching Assistant - PhD student as...@dc... - http://www.dcs.warwick.ac.uk/~ashley/ Room 3.16, Department of Computer Science, University of Warwick, Coventry |