| Reply | « Previous Thread | Next Thread » |
|
(I didn't find a bug reporting system, so I apologize if this is the wrong place for this)
There seems to be a bug in the interaction between the Wireless Keyboard application ( Nokia_SU8W_BTKeyboard.sis 25-Apr-2005 ) and the appuifw tabs in Python apps. Behavior: When the keyboard application is installed on the phone (just installed, not necessarily running), the tabs in the Python app become hidden. They do function (send callbacks appropriately), however. When the keyboard application is removed, the tabs reappear. Platform: This was tested on a 6600, Firmware v 4.09.1 26-02-04 NHL-10 with Python 1.1.6 (both fast / regular). Repeatability: The activity survives reboots and reinstalls of Python and the keyboard application. It has only been tested on one device with an unclean install. Test case below: Code:
# tab test
import appuifw
import e32
class App:
def __init__(self):
self.lock = e32.Ao_lock()
self.old_title = appuifw.app.title
appuifw.app.title = u"tab Test"
self.exit_flag = False
appuifw.app.exit_key_handler = self.abort
self.listbox1 = appuifw.Listbox([u"item 1", u"item 2"], self.blah)
self.listbox2 = appuifw.Listbox([u"item 3", u"item 4"], self.blah)
appuifw.app.set_tabs([u"abc", u"def"], self.update_tab_contents)
self.currenttab = 0
self.lock.signal()
def blah(self):
pass
def refresh(self):
self.update_tab_contents( self.currenttab )
def update_tab_contents(self,index):
self.currenttab = index
if index == 0:
appuifw.app.body = self.listbox1
elif index == 1:
appuifw.app.body = self.listbox2
def loop(self):
try:
self.lock.wait()
while not self.exit_flag:
self.refresh()
self.lock.wait()
finally:
pass
def close(self):
appuifw.app.set_tabs([], None)
appuifw.app.body = None
appuifw.app.exit_key_handler = None
appuifw.app.title = self.old_title
def abort(self):
# Exit-key handler.
self.exit_flag = True
self.lock.signal()
def main():
app = App()
try:
app.loop()
finally:
app.close()
if __name__ == "__main__":
main()
|
|
Quote:
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |