Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
- Subject: Re: [Q] which arrives earlier? applicationShouldTerminate or applicationWillTerminate
- From: JongAm Park <email@hidden>
- Date: Fri, 26 May 2006 00:17:50 -0700
Thank you, Mr. Bowman
Andrew Bowman wrote:
On May 25, 2006, at 11:52 PM, JongAm Park wrote:
Hello.
I would like to terminate a thread when an application program quits.
So, I tried checking when the "Quit" is invoked. One simple approach
is to set a flag when applicationWillTerminate: or
applicationShouldTerminate is invoked.
I don't know which one is called first. So I put NSLog() into each
method.
It turned out that applicationShouldTerminated is called first.
However, Apple's document says that they are called immediately before
an application quit.
So, I am not sure if the order of calling is always preserved, or
sometimes it changes.
Is the applicationShouldTerminated called before
applicationWillTerminate always?
Thank you.
JongAm Park
It would be kind of silly to have applicationWillTerminate called first,
since there's a chance the termination won't take place due to a return
of NO in applicationShouldTerminate. I believe the ordering you
observed remains fixed.
- Andrew Bowman
--
±ºÀÚÀÇ ±³Á¦´Â ¹°Ã³·³ ´ã¹ÚÇÏ°í, ¼ÒÀÎÀÇ ±³Á¦´Â ´Ü¼úó·³ ´ÞÄÞÇÏ´Ù.
-- ¸í½Éº¸°¨ ±³¿ìÆí
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=++=+=+=+=
JongAm Park Home : http://my.dreamwiz.com/jongam
Blog : http://jongampark.blogspot.com
Tel)213-251-9592 MSN : email@hidden
H.P)213-820-8943 AIM/iChat : JongAm
_______________________________________________
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