• 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: How to delay application quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to delay application quit?


  • Subject: Re: How to delay application quit?
  • From: "Sherm Pendley" <email@hidden>
  • Date: Sun, 23 Mar 2008 23:24:14 -0400

On Sun, Mar 23, 2008 at 9:55 PM, Samvel <email@hidden> wrote:

> Hi,
>
> I have defined class (say, Download) that uses NSURLConnection to
> download something from internet. My application is Cocoa with UI. I
> want to call:
>
> [Download cancel]
>
> and wait for notification from this class once user quits application.


In your app delegate, implement -applicationShouldTerminate: to call the
above cancel method and return NSTerminateLater. Then, when the cancellation
is done, call [NSApp replyToApplicationTerminate:YES]. Or NO, to cancel the
termination request.

sherm--
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to delay application quit?
      • From: Samvel <email@hidden>
References: 
 >How to delay application quit? (From: Samvel <email@hidden>)

  • Prev by Date: Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"
  • Next by Date: Re: How do I disable this warning: "local declaration of 'varname' hides instance variable"
  • Previous by thread: How to delay application quit?
  • Next by thread: Re: How to delay application quit?
  • Index(es):
    • Date
    • Thread