Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 20. Services > Controlling the Services Menu - Pg. 717

20.4. Controlling the Services Menu 717 are in the terminal, you can now pop up a graphical view of a file and change any of the properties that the Finder knows about. Note that you don't need to write a full application for this to work. Simple command-line tools like this can interact with applications easily. On a lot of UNIX-like systems, it's common to write graphical applications that are wrappers around command-line utilities. You might consider doing the reverse on OS X: writing a graphical application and then exposing aspects of its functionality to the command line via simple tools like this that use services. 20.4 Controlling the Services Menu Most of the time, you don't need to do anything to make the services menu work. The instance of NSApplication associated with your app will make everything work as it should. Sometimes, however, you might wish to have a different services menu to the default. Each NSResponder subclass in your application will call this method on NSApp : - (void)registerServicesMenuSendTypes: (NSArray*)sendTypes returnTypes: (NSArray*)returnTypes; This ensures that every services item that accepts one of the send types and