Blog

python Commands

By Tuesday, March 28, 2006 No Comments

more hints from http://www.mobilenin.com

Info: Input fields (Single-field dialogues) and Pop-up notes (notes)

Single-field dialogues: appuifw.query()

These lines perform a query with a single-field dialog, each with a different input type.
They use the .query() function of the appuifw module. -> appuifw.query(label, type)
-> label must be in unicode

Example script: query.py

# text:
data = appuifw.query(u”Type a word:”, “text”)

# number:
data = appuifw.query(u”Type a number:”, “number”)

# date:
data = appuifw.query(u”Type a date:”, “date”)

# time:
data = appuifw.query(u”Type a time:”, “time”)

# code:
data = appuifw.query(u”Type a code:”, “code”)

# query:
data = appuifw.query(u”Are you ok:”, “query”)

Pop-up notes: appuifw.note()

These lines perform pop-up notes of different types: info, error, conf
They use the .note() function of the appuifw module. -> appuifw.note(label, type)
-> label must be in unicode

Example script: note.py

# info:
appuifw.note(u”Hello”, “info”)

# error:
appuifw.note(u”file not found”, “error”)

# conf:
appuifw.note(u”upload done”, “conf”)

Leave a Reply