Re: How to delay application quit?
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