WEB开发网
开发学院手机开发Symbian 开发 Symbian S60 Python 编程指南 如何创建一个应用程... 阅读

Symbian S60 Python 编程指南 如何创建一个应用程序

 2010-08-30 00:06:00 来源:WEB开发网   
核心提示:Python代码def quit():appuifw.app.set_exit()app.exit_key_handler=quitdef quit():appuifw.app.set_exit()app.exit_key_handler=quit6,如何设定程序名称(标题)?Python代码appuifw.app.t

Python代码

def quit():

appuifw.app.set_exit()

app.exit_key_handler=quit

def quit():

appuifw.app.set_exit()

app.exit_key_handler=quit

6,如何设定程序名称(标题)?

Python代码

appuifw.app.title = u"SMS sending"

appuifw.app.title = u"SMS sending"

7,如果有必要,如何来分配有效的对象?

A facility called active object is used extensively on the Symbian OS to implement co-operative, non-preemptive scheduling within operating system threads. Preserving the responsiveness of the UI can be done with the help of active objects. This needs to be considered when designing the application logic. As a Python programmer, you typically need to take care of active objects as they relate to UI programming, and sockets. Can be tricky!

Python代码

# You need to import the e32 module

import e32

# create an instance of the active object

app_lock = e32.Ao_lock()

# starts a scheduler -> the script processes events (e.g. from the UI) until lock.signal() is

# callled.

app_lock.wait()

# stops the scheduler

app_lock.signal()

# You need to import the e32 module

import e32

# create an instance of the active object

app_lock = e32.Ao_lock()

# starts a scheduler -> the script processes events (e.g. from the UI) until lock.signal() is

# callled.

app_lock.wait()

# stops the scheduler

app_lock.signal()

8,如何设置程序主体?

Python代码

# body as Listbox:

appuifw.app.body = appuifw.Listbox(entries,shout)

# body as Listbox:

appuifw.app.body = appuifw.Listbox(entries,shout)

示例代码:

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

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:Symbian Python 编程

编辑录入:coldstar [复制链接] [打 印]
赞助商链接