Custom Search

Sunday, January 3, 2010

PyS60 Tutorial - Notifications

PyS60 Tutorial - Notifications

-----------------------------------------

Notifications

Notifications are used to show messages.

Following are the different types of notifications

/*********** Description Start *************/

import appuifw

# To shows a standard message.

# calling the free function "note" of "appuifw" module.

appuifw.note(u"Almost finished...")

# To shows the message as a confirmation

appuifw.note(u"Download complete", "conf")

# To shows the message as a warning with appropriate sound

appuifw.note(u"Invalid syntax", "error")

/*********** Description End *************/

/*********** Note Start *************/

note(text[, type[, global ] ])

Displays a note dialog of the chosen type with text (Unicode). The default value for type is 'info', which is automatically

used if type is not set. type can be one of the following strings: 'error', 'info', or 'conf'.

Note that you can display notes even when your application is in the background by setting the "global" flag to 1.

Here "note" is a free functions functions that do not belong to any class − are defined in the appuifw module.

So we can directly call the function "note" using module name "appuifw".

/*********** Note End *************/

No comments:

Post a Comment