[Pyobjc-dev] NSProgressIndicator ignores incrementBy when called using performSelectorOnMainThread_
Brought to you by:
ronaldoussoren
|
From: Johannes S. <lgo...@go...> - 2008-10-25 16:46:33
|
I am trying to advance an NSProgressIndicator from a thread, therefor
i am using performSelectorOnMainThread_withObject_waitUntilDone_
to have the incrementBy call done from the main thread.
However while just calling progress_indicator.incrementBy_(some_value)
works just as expected,
progress_indicator.
performSelectorOnMainThread_withObject_waitUntilDone_("incrementBy:",
some_value, True)
just does not seem to do anything. See the code below for an simple
example.
from Foundation import *
import objc
class controller(NSObject):
progress_indicator = objc.IBOutlet()
@objc.IBAction
def go_(self, sender):
# WORKS
self.performSelectorOnMainThread_withObject_waitUntilDone_("test:",
25, True)
# DOES NOT SEEM TO WORK
self
.progress_indicator
.performSelectorOnMainThread_withObject_waitUntilDone_("incrementBy:",
25.0, True)
def test_(self, x):
print 'yaye', x
What am I doing wrong?
Regards,
Johannes
|