Posts: 249
Joined: Feb 2005
Reputation:
0
EnderW
Skilled Python Coder
Posts: 249
you shouldn't have to as far as i know...dunno why that problem occours. python in xbmc is kinda buggy though (or i suck at coding). i suggest you make a function in the first class instead, like:
def changelabel1(self, text):
self.labelname.setlabel(text)
then you call mw.changelabel1("test") instead. that should work.
-edit-
eh...the show() command could perhaps cause some problems in this case, depending on how it actually works (which i don't know). you could try doing domodal() instead and see if you can change the label then. just a wild guess - i suggest you try the first thing i mentioned first.
-edit2-
i hope you didnt' copy and paste from your code, since you are calling it mw=mywindow() instead of mw=mywindow()
xbmcscripts.com administrator
Posts: 14
Joined: Jun 2005
Reputation:
0
thank you enderw! that worked :kickass:
the show works in my code as expected, so i think there is no problem there.
does upper/lower case of functions and variables matter in python?
sorry for the stupid question, i just started python a few days ago and in vb nobody cares about that :d
Posts: 249
Joined: Feb 2005
Reputation:
0
EnderW
Skilled Python Coder
Posts: 249
upper/lower case matters very much. "object1" and "object1" aren't the same objects. glad to hear that it worked out.
unless you're using show for a specific reason you might want to know that domodal() is much faster at updating and generally better to use. but if it works fine, why change it...i believe the advantage is only seen in certain circumstances.
xbmcscripts.com administrator
Posts: 14
Joined: Jun 2005
Reputation:
0
thanks for the clarification.
the reason i use show is that i show and close the window from a different function, if i would use domodal my code would stop.
i finished version 0.1 in which everything except the "silent-mode" works. i just uploaded it to xbmcscripts.com.
Posts: 14
Joined: Jun 2005
Reputation:
0
thanks,
so now i just need some guineapig to test and give feedback :evil:
Posts: 249
Joined: Feb 2005
Reputation:
0
EnderW
Skilled Python Coder
Posts: 249
changed...
time to finally hit the bed now, if you make corrections please upload (when you're done) and i'll update tomorrow.
xbmcscripts.com administrator