Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2007

    Equivalent to javascript pop ups

    Hi all.

    Im unsure exactly what is available in this respect when talking about python.

    For example, i would have a user enter say name and address etc. I would then have a pop up window saying are you sure where they could confirm this.

    Another example would be if the user wanted to exit the app, i would then present an "are you sure" window etc.

    What options are available to me in python for this type of functionality??

    Thank You All

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Deva, Romania

    Re: Equivalent to javascript pop ups

    appuifw.query(u"Text here", "query") is probably the answer for you.
    As for the two situations you mentioned:
    import appuifw, e32
    def quit():
    	if(appuifw.query(u"Are you sure you want to exit?", "query")):app_lock.signal()
    #If the user selects "yes", the application closes, otherwise nothing happens
    def enterinfo():
    	name=appuifw.query(u"Type your name", "text")
    	if(appuifw.query(u"Are you sure", "query")):print name  #Save name as it was provided or do whatever you want with it
    	else: enterinfo()  #If the user is not sure (meaning if "no" was selected) the prompt to enter the name again is shown
    #Set the menu
    appuifw.app.menu=[(u"Enter name", enterinfo), (u"Exit", quit)]

  3. #3
    Registered User
    Join Date
    Nov 2007

    Re: Equivalent to javascript pop ups

    That's great, i can definitely work with that.

    i probably should have known about that part of appuifw from learning a while ago.

    Thank you for your help Bogdan.

Similar Threads

  1. Replies: 1
    Last Post: 2007-06-04, 22:55
  2. I want to make a pop up window
    By w_hashem12 in forum Symbian
    Replies: 10
    Last Post: 2005-08-26, 11:31
  3. Nokia 9210 cant read JavaScript web pages
    By barnsley in forum Symbian
    Replies: 0
    Last Post: 2004-08-24, 14:05
  4. Dismiss a pop up dialog
    By hsinyee in forum Symbian User Interface
    Replies: 2
    Last Post: 2003-06-10, 17:33

Posting Permissions

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