Saturday, November 18, 2017

#1 2009-09-10 07:32:50 pm

Lambo
Member
From:: England
Registered: 2005-12-05
Posts: 75

Quit app after last window closed

Hi guys,

I'm trying to get my app to quit when you close it's last window.

I could do this in AppleScript studio but can't work out ho in AppleScriptObjC. Any ideas?

Thanks,

Joe

Offline

 

#2 2009-09-10 07:48:21 pm

Craig Williams
Administrator
From:: Ft. Smith, AR
Registered: 2006-12-07
Posts: 888

Re: Quit app after last window closed

Applescript:

   on applicationShouldTerminateAfterLastWindowClosed_(sender)
       return true
   end applicationShouldTerminateAfterLastWindowClosed_

Offline

 

#3 2009-09-10 08:15:45 pm

Lambo
Member
From:: England
Registered: 2005-12-05
Posts: 75

Re: Quit app after last window closed

Of course, thank you smile

Offline

 

#4 2009-09-10 08:23:28 pm

Craig Williams
Administrator
From:: Ft. Smith, AR
Registered: 2006-12-07
Posts: 888

Re: Quit app after last window closed

You're welcome!

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)