[Pyobjc-dev] Performing selectors example?
Brought to you by:
ronaldoussoren
From: James T. <tra...@gm...> - 2009-11-08 08:18:42
|
Hi, I'm trying to get performSelectorOnMainThread working in PyObjC, based on an example found on the site: http://pyobjc.sourceforge.net/documentation/pyobjc-framework-Cocoa/threading-helpers.html However, I've been unsuccessful in my attempts to receive the callback. Can anyone point me to a working example of this functionality? ---------- class MyClass (Foundation.NSObject): def callback(self, arg): print "Test!" def setup(self, arg): self.pyobjc_performSelectorOnMainThread_withObject_('test', 44) dl = MyClass.alloc().init() setup("arg") --> [MyClass pyobjc_performOnThreadWithResult:]: unrecognized selector sent to instance ... |