×

Discussion Board

Results 1 to 1 of 1

Threaded View

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    32

    e32.ao_sleep(5) stops the application?

    This is my code.I want to show the image 5 seconds and show the text "Hello world" . It works correctly as a script in Python application. However, when it is changed to a stand-alone application. It stop at "e32.ao_sleep(5)". As a result , i can't show the text(hello world)..........I used 2 days to check what is the problem...but I can't find the answer..... In the Python application, there is no error.........anybody can help me?

    ----------------------------------------------------------------------------------
    from appuifw import *
    from key_codes import *
    from graphics import Image
    import e32

    app.screen = 'full'
    app.body = c= Canvas()
    lock = e32.Ao_lock()

    def draw():
    c.blit(Image.open(u"C:\\Nokia\\Images\\game.png"))
    e32.ao_sleep(5)
    appuifw.note(u"testing 3",'info')

    running = 1

    def handle_exit():
    appuifw.app.set_exit()

    app.exit_key_handler= handle_exit

    def text():
    appuifw.note(u"testing 2",'info')
    textN=appuifw.Text()
    textN.add(u"Hello World")
    appuifw.app.body =textN
    lock.wait()
    app.exit_key_handler= handle_exit

    draw()
    while running:
    appuifw.note(u"testing 1",'info')
    text()
    ------------------------------------------------------------------------------------
    Last edited by llapplecn; 2005-07-21 at 03:25.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •