Re: [Pyobjc-dev] Creating selectors for NSTimer
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-04-03 06:21:16
|
On Wednesday, Apr 2, 2003, at 22:59 Europe/Amsterdam, Antonio Rodriguez wrote: > Hello all, > > trying to create a a selector argument for the creation of an NSTimer > from python code. Does anyone have the magic incantation required. I > figured that since PyObjC is so graceful, I could pass a string (ie, > 'self.doUpdate' for a method 'def doUpdate (self, sender):') but it > doesn't seem to work. > > Basically I'm trying to create an NSTimer to fire stuff off given that > threading doesn't work yet. The names of your action methods should end in an underscore (e.g. 'def doUpdate_(self, sender):'). This is required due to the way this name is translated into an Objective-C method name, which in your cause would be -doUpdate:(id)sender. Ronald |