![]() |
2010-02-09
, 15:28
|
Posts: 53 |
Thanked: 90 times |
Joined on Nov 2009
@ Manaus, Brazil
|
#2
|
[...] I wanted to use :
as againstCode:gobject.timeout_add_seconds(1, self.update)
However when I use "gobject.timeout_add_seconds", in a desktop widget context for diablo, I get this error msgCode:gobject.timeout_add(1000, self.update)
[...]
![]() |
2010-02-09
, 15:34
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#3
|
def _old_timeout_add_seconds(timeout, callback): return gobject.timeout_add(timeout * 1000, callback) def _timeout_add_seconds(timeout, callback): return gobject.timeout_add_seconds(timeout, callback) try: gobject.timeout_add_seconds timeout_add_seconds = _timeout_add_seconds except AttributeError: timeout_add_seconds = _old_timeout_add_seconds
The Following User Says Thank You to epage For This Useful Post: | ||
![]() |
2010-02-09
, 16:15
|
Posts: 133 |
Thanked: 172 times |
Joined on Jul 2009
@ Travel bag
|
#4
|
If this is true, I wanted to use :
TiA
Shin