Hi again,
I have added my code here.. The code might not sound professional so kindly bear with it...
Code:
import appuifw
import e32
app_lock = e32.Ao_lock()
def quit():
app_lock.signal()
appuifw.app.exit_key_handler = quit
def menu():
global saved
lb=main()
fields = [(u"Name",'text',u'')]
flags = appuifw.FFormEditModeOnly
saved = False
def save(arg):
global saved
saved = True
return True
form = appuifw.Form(fields,flags)
form.save_hook= save
form.execute()
if saved == True:
add = form[0][2]
DynList.append(add)
lb = main()
appuifw.app.menu = [(u"Add",menu),(u"Exit",quit)]
DynList = [(u"John")]
def Handle_Selection():
lb = main()
appuifw.note(u"Welcome " + DynList[lb.current()])
def main():
lb = appuifw.Listbox(DynList,Handle_Selection)
appuifw.app.body = lb
return lb
main()
app_lock.wait()
When I click on any item in the list (even after adding some items in the list) it always gives "Welcome John"
I am not able to get the current listbox item at all...
What change to make in this sample code to get the current item displayed...