You Are Here:

Community: Developer Discussion Boards

#1 Old How to really quit an app? - 2008-10-29, 19:56

Join Date: Sep 2008
Posts: 21
JimmPooJimmPoo
Offline
Registered User
hi I have a problem

I wrote this:
Code:
def quit():
    globalui.global_query(u"Do you want to quit?")
    app_lock.signal()
    appuifw.app.set_exit()
But when I press "no" the app ends...
how to make it, that the app only ends when I'm pressing yes?
Reply With Quote

#2 Old Re: How to really quit an app? - 2008-10-29, 20:02

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by JimmPooJimmPoo View Post
hi I have a problem

I wrote this:
Code:
def quit():
    globalui.global_query(u"Do you want to quit?")
    app_lock.signal()
    appuifw.app.set_exit()
But when I press "no" the app ends...
how to make it, that the app only ends when I'm pressing yes?
Hi JimmPooJimmPoo,

For preventing the application to close when you press red key, you can use the envy module. Then, if you press the red key it will still run in background.

And for quiting just when user select yes on the query, you can do this:

Code:
import appuifw, globalui

def quit():

    query = globalui.global_query(u"Do you want to quit?")
    
    if query == 1:
        app_lock.signal()
        appuifw.app.set_exit()

Hope it helps,

Rafael.
Last edited by Rafael T. : 2008-10-29 at 20:09.
Reply With Quote

#3 Old Re: How to really quit an app? - 2008-10-29, 20:08

Join Date: Sep 2008
Posts: 21
JimmPooJimmPoo
Offline
Registered User
hmm okay but when I use the code I've written in fist post, a message appears: "Do you want to quit?"
Those things to choose: "No" and "Yes"

When I press "Yes" -> App ends...
But when I press "No" -> App ends too....
how to change that?

What I want:
when u press "no" app will still run...



I would look at croozeus.com, but there is connection error
Reply With Quote

#4 Old Re: How to really quit an app? - 2008-10-29, 20:13

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by JimmPooJimmPoo View Post
hmm okay but when I use the code I've written in fist post, a message appears: "Do you want to quit?"
Those things to choose: "No" and "Yes"

When I press "Yes" -> App ends...
But when I press "No" -> App ends too....
how to change that?

What I want:
when u press "no" app will still run...



I would look at croozeus.com, but there is connection error
Hi again

I have edited the previous post, see the example I did, please. You have only to use the 'if' clause

If the query returns 1, the user selected yes, and if returns 0, the user selected no.


BR,

Rafael.
Reply With Quote

#5 Old Re: How to really quit an app? - 2008-10-29, 20:21

Join Date: Sep 2008
Posts: 21
JimmPooJimmPoo
Offline
Registered User
Great. Thank u bro
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
Try to ODD app, get Symbian err -10509 glindberg Mobile Java Tools & SDKs 2 2008-05-30 06:58
renaming app, how?? Audun Holme General Symbian C++ 2 2007-05-13 13:10
HttpConnection fails when app in background (onS60 phone) and WAP browser uses new AP david_parry1976 Mobile Java Networking & Messaging & Security 0 2007-02-22 17:37
Dialog's clipping area (again). Nokia experts, please help synov Symbian User Interface 0 2004-06-26 15:35
7650 - go back, close my app not closing the container app geran Digital Rights Management & Content Downloading 1 2002-12-05 10:58

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