python - RUMPS Updating Application Title -
so i've been working on little python application using rumps , i'd periodically update title of application in status bar. there appears function in rumps should i'm looking can't seem work, here's adaption of illustration code shows issue i'm running into:
import rumps class awesomestatusbarapp(rumps.app): def __init__(self): super(awesomestatusbarapp, self).__init__("awesome app") self.menu = ["updating"] @rumps.timer(1) def sayhi(self, _): super(awesomestatusbarapp, self).title(self,"hi") if __name__ == "__main__": awesomestatusbarapp().run() the super phone call in init function works fine, , title function in sayhi function should i'm looking for, update title , tell nsstatusbar update it, i'm failing next result:
2014-06-18 10:03:26.033 python[29628:1107] : 'nonetype' object not callable
and big traceback (which can provide, didn't format well).
i think error i'm running may have threading going on, i'm @ loss of do. tried shifting away rumps, can't nsstatusbar work on own, throws own error. i'm looking simple, seems can never work right, pity.
any help or advice appreciated, thanks!
there @ to the lowest degree 2 problems code:
the phone call super() in sayhi not necessary
in phone call .title() in sayhi shouldn't pass "self" argument
i have no thought whether either of these related problem without seeing traceback.
python pyobjc nsstatusbar
No comments:
Post a Comment