×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    17

    How to do self auto refresh by the program itself

    (Pls ignore wrong indentation)
    I can only do manually refresh while my program is running.

    There is something wrong with my code shown below:
    appuifw.app.menu = [(u"Refresh", self.refresh)]

    def loop(self):
    try:
    self.refresh()
    self.lock.wait()
    while not self.exit_flag:
    self.refresh()
    self.lock.wait()
    finally:
    self.db.close()


    def close(self):
    appuifw.app.menu = []
    appuifw.app.body = None
    appuifw.app.exit_key_handler = None
    appuifw.app.title = self.old_title

    def abort(self):
    # Exit-key handler.
    self.exit_flag = True
    self.lock.signal()

    def refresh(self):
    self.db.network()
    appuifw.app.body.set(self.db.text)

    def main():
    app = network_app()
    try:
    app.loop()
    finally:
    app.close()

    if __name__ == "__main__":
    main()

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    Kyiv (Ukraine)
    Posts
    83

    Re: How to do self auto refresh by the program itself

    Quote Originally Posted by ComThink View Post
    (Pls ignore wrong indentation)
    I can only do manually refresh while my program is running.

    There is something wrong with my code shown below:
    appuifw.app.menu = [(u"Refresh", self.refresh)]
    refresh every 60 seconds
    Code:
    while 1:
        self.refresh()
        e32.ao_sleep(60)

Similar Threads

  1. How to auto start a program in S60 3rd Edition?
    By classicsong in forum Symbian
    Replies: 34
    Last Post: 2008-04-12, 14:10
  2. How to creat auto start up program on UIQ?
    By Joney.Zhang in forum Symbian
    Replies: 0
    Last Post: 2006-08-17, 04:40
  3. Connecting Java(J2SE) program on PC with SymbianC++ program on mobile using bluetooth
    By dotmilind in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-03-25, 23:10
  4. Replies: 1
    Last Post: 2005-05-24, 02:26

Posting Permissions

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