From: James Trankelson <trankelson@gm...> - 2009-11-08 08:18:42
I'm trying to get performSelectorOnMainThread working in PyObjC, based
on an example found on the site:
However, I've been unsuccessful in my attempts to receive the
callback. Can anyone point me to a working example of this
class MyClass (Foundation.NSObject):
def callback(self, arg):
def setup(self, arg):
dl = MyClass.alloc().init()
--> [MyClass pyobjc_performOnThreadWithResult:]: unrecognized selector
sent to instance ...
From: Luc Heinrich <luc@ho...> - 2009-11-08 10:00:42
On 8 nov. 2009, at 09:18, James Trankelson wrote:
> class MyClass (Foundation.NSObject):
> def callback(self, arg):
> print "Test!"
> def setup(self, arg):
> self.pyobjc_performSelectorOnMainThread_withObject_('test', 44)
Well, you are trying to call a 'test' selector which clearly does not
exist, hence the 'unrecognized selector'.
You probably want:
Luc Heinrich - luc@...