• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exiting program?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting program?


  • Subject: Re: Exiting program?
  • From: Hank Heijink <email@hidden>
  • Date: Tue, 31 Oct 2006 15:25:26 -0500

You should call [NSApp terminate:self] instead of calling exit(0). I believe the argument to terminate: doesn't usually matter -- you can supply nil as well.

On Oct 31, 2006, at 3:20 PM, Marcus Pedersén wrote:

Hi all!
I have a small app where I have got an Exit button. When user clicks the button the message exit(0) is sent and the app treminates. So far so good.
In the app I use NSUserDefaults to save strings to DB.
...and here is my problem.
If I delete a row in my view and exit my app with exit(0) this row appears again when app is started, but if I delete a row and than quits my program with the main (left) menu "Quit myApp" the row disapears and does not show on restart, so how is Quit in main menu set up and what is the difference compared with exit(0)??


Many thanks in advance!

Marcus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


Hank Heijink www.hankheijink.com email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Exiting program? (From: Marcus Pedersén <email@hidden>)

  • Prev by Date: Re: Exiting program?
  • Next by Date: Closing window with "red button"?
  • Previous by thread: Re: Exiting program?
  • Next by thread: Closing window with "red button"?
  • Index(es):
    • Date
    • Thread