Hello !
I want to use keypress simulation, avoiding user have to press left key for saving a Python S60 form - in other words, I want that, when pressing right key ("Back"), form is automatically saved.
Is it enough add the appropriate statement - "keypress.simulate_key(EKeyLeftSoftkey, EScancodeLeftSoftkey)" ?
And where must I put it in my code ?
Thanks for answers.
That's the code I' using
import appuifw
from key_codes import *
import keypress
appuifw.app.title = u'Title'
appuifw.app.body=appuifw.Canvas()
while True:
data = [(u'Val','number', 0), (u'Year','number', 0), (u'Tax','text', u'')]
f = appuifw.Form(data, appuifw.FFormEditModeOnly)
f.execute()
val = f[0][2]
year = f[1][2]
tax = float(f[2][2])
month = year * 12
value = val *((tax/1200)*(pow((1+(tax/1200)),month))/(pow((1+(tax/1200)),month)-1))
appuifw.popup_menu([u"value", unicode(value)])
new_calc = appuifw.query(u"New calc", "query")
if not new_calc:
break

Reply With Quote

