Hi,
Iβm kind of hoping that a Tkinter or Tk expert is reading thisβ¦
A PyObjC user tries to call Tkinter from a Cocoa program (that is, the Cocoa runloop starts before the Tkinter one) and gets an error message:
-[NSApplication _setup:]: unrecognized selector sent to instance
Furthermore the Tkinter GUI doesnβt work. PyObjCβs issue about this:
https://bitbucket.org/ronaldoussoren/pyobjc/issues/201/tkinter-method-tk-faβ¦
Iβve done some quick browsing of the Tk source code and it appears that Tk assumes that -[NSApplication sharedApplication] returns an instance of a Tk-specific private subclass of NSApplication and that wonβt be true when the Tk runloop is started before the Cocoa one.
My question: is my analysis correct? And has anyone successfully mixed PyObjC and Tkinter in this way? I guess this issue could be avoided by initialising Tk before calling into Cocoa.
Ronald