• 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: Terminating another application.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminating another application.


  • Subject: Re: Terminating another application.
  • From: ∞ <email@hidden>
  • Date: Fri, 18 Jan 2008 18:08:50 +0100


Il giorno 18/gen/08, alle ore 17:43, Anoop Thomas Varghese ha scritto:

Hi All,

I am trying to terminate another application by using my application.
Eg:
I have to kill another application that has relation with my component,
Please tell me how is it possible.


Can i use the same code

[NSApp terminate:]

How can i give another application's id.

If by "id" you mean the object pointer type "id" that Objective-C provides, you cannot; in the sense that another application's objects are not directly accessible, because they are in another app's address space.


If you control the code for the other application, you can use Distributed Objects, distributed notifications or other interprocess communication techniques to send a message to it asking to quit. If you don't, all Mac apps respond to the "quit" Apple Event; you can write a small "tell app "Some Application" to quit" AppleScript to send that event, and NSAppleScript to run it from your Cocoa app.

Google any of the terms above for more info.

 - ∞

_______________________________________________

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


References: 
 >Terminating another application. (From: "Anoop Thomas Varghese" <email@hidden>)

  • Prev by Date: Re: Terminating another application.
  • Next by Date: Check ability to write to nonexistent directory
  • Previous by thread: Re: Terminating another application.
  • Next by thread: Re: Terminating another application.
  • Index(es):
    • Date
    • Thread