Posted to tcl by das at Wed Oct 31 17:45:49 GMT 2007view raw
- Index: macosx/tkMacOSXInit.c
- ===================================================================
- RCS file: /cvsroot/tktoolkit/tk/macosx/tkMacOSXInit.c,v
- retrieving revision 1.33
- diff -u -p -r1.33 tkMacOSXInit.c
- --- macosx/tkMacOSXInit.c 6 Sep 2007 19:33:56 -0000 1.33
- +++ macosx/tkMacOSXInit.c 31 Oct 2007 17:43:28 -0000
- @@ -18,6 +18,8 @@
- #include "tclInt.h" /* for Tcl_GetStartupScript() & Tcl_SetStartupScript() */
- +#include <AppKit/NSApplication.h>
- +
- #include <sys/stat.h>
- #include <sys/utsname.h>
- #include <mach-o/dyld.h>
- @@ -135,6 +137,7 @@ TkpInit(
- long osVersion = 0;
- initialized = 1;
- + NSApplicationLoad();
- /*
- * Initialize/check OS version variable for runtime checks.
- Index: macosx/tkMacOSXNotify.c
- ===================================================================
- RCS file: /cvsroot/tktoolkit/tk/macosx/tkMacOSXNotify.c,v
- retrieving revision 1.19
- diff -u -p -r1.19 tkMacOSXNotify.c
- --- macosx/tkMacOSXNotify.c 29 Jun 2007 03:20:02 -0000 1.19
- +++ macosx/tkMacOSXNotify.c 31 Oct 2007 17:43:29 -0000
- @@ -17,6 +17,8 @@
- #include "tkMacOSXPrivate.h"
- #include "tkMacOSXEvent.h"
- #include <pthread.h>
- +#include <pthread.h>
- +#include <Foundation/NSAutoreleasePool.h>
- /*
- * The following static indicates whether this module has been initialized
- @@ -184,8 +186,12 @@ CarbonEventsCheckProc(clientData, flags)
- if (numFound > 4) {
- numFound = 4;
- }
- + if (numFound > 0) {
- + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- while (numFound > 0 && err == noErr) {
- err = TkMacOSXReceiveAndDispatchEvent();
- numFound--;
- }
- + [pool release];
- + }
- }