You Are Here:

Community: Developer Discussion Boards

#1 Old Equivalent to javascript pop ups - 2008-04-01, 14:53

Join Date: Nov 2007
Posts: 26
neil1811
Offline
Registered User
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
Reply With Quote

#2 Old Re: Equivalent to javascript pop ups - 2008-04-01, 15:01

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
appuifw.query(u"Text here", "query") is probably the answer for you.
As for the two situations you mentioned:
Code:
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)]

app_lock=e32.Ao_lock()
app_lock.wait()
Reply With Quote

#3 Old Re: Equivalent to javascript pop ups - 2008-04-01, 15:16

Join Date: Nov 2007
Posts: 26
neil1811
Offline
Registered User
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.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
how to sign a midlet without getting pop ups for connections Basu Mobile Java General 1 2007-06-04 23:55
I want to make a pop up window w_hashem12 General Symbian C++ 10 2005-08-26 12:31
9500 & Javascript Applications gotan General Browsing 0 2005-07-27 13:23
Nokia 9210 cant read JavaScript web pages barnsley General Symbian C++ 0 2004-08-24 15:05
Dismiss a pop up dialog hsinyee Symbian User Interface 2 2003-06-10 18:33

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia