• 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: services
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: services


  • Subject: Re: services
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 3 Jan 2002 15:05:15 -0800

On Friday, December 28, 2001, at 06:06 PM, Simson Garfinkel wrote:

I'm now trying to get services to work. (People who are following in the
table of contents will note that Mike and I have now completed chapters 0-19
and 21 and we are now trying to get chapter 20 finished.)

Whole bunch of questions.

1. Is Info.plist supposed to be in property-list format or in XML?
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/Programmin
gTopics/SysServices/index.html
indicates that it is supposed to be in PLIST format.

http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/Programmin
gTopics/SysServices/Concepts/properties.html#CHDJDFIC
seems to indicates that it should be in XML, and that you should edit the
XML using the "plist editor" --- that is, the EXPERT mode of Project
Builder.

We are pretty forgiving about our plists--we will usually accept either the new XML plist format or the old ASCII one. However, the XML plist format is the new standard, so you should probably stick with it.

2. This is really ugly. Are there any plans to have a real services editor?

Well, it's not really more or less ugly than other uses of the PB plist editor. You could certainly suggest to the PB folks that they provide a special-purpose services pane.

3. How does Workspace determine where the applications are that provide
services? Does it scan all of the applications on the HFS+ disk? What about
UFS drives?

Currently the various Applications and Services directories in the standard domains are searched. In future we expect to be considerably less location-dependent.

4. if I am creating a new service, how do I get Workspace to notice that the
service is now being published?

Log out and log back in. Again, this is expected to change in the future.

5. Are services offered to Carbon applications? it doesn't look like they
are.

They are, but I believe some work is required on the part of the application. There is some documentation now available about this.

6. Hey, Apple, the Summarize service is really cool. Try it on a CNN
article.

7. What is the "userdata" ?

8. Is the "port" simply the name of the application?

9. Is the message simply the first part of the method name?

From the old documentation:

"NSMessage indicates the name of the Objective-C method to invoke. Its value is the first part of the method name, which follows the form messageName:userData:error:. This is a required entry.

NSPortName is the name of the port the application should use to listen for service requests. Its value depends on how you registered the service provider. If you used the NSApplication method setServicesProvider:, NSPortName is the application name. If you used the NSRegisterServicesProvider() function (which should only be used for filter services), NSPortName is the value passed to that function for its name argument. See "Filter Services" for more information on NSRegisterServicesProvider(). This is a required entry.

...

NSUserData is a string containing a value of your choice. You can use this string to control the behavior of your service method; this entry is useful for applications that provide open-ended services (see "Add-on Services"). NSUserData is an optional entry."

Since there is no new documentation about services, the old documentation remains the best source of information, even though it is not entirely up to date.

Douglas Davidson


  • Follow-Ups:
    • Re: services
      • From: "Sven-S. Porst" <email@hidden>
  • Prev by Date: Re: Threads and GUI
  • Next by Date: Re: Unicode filename and FSPathMakeRef
  • Previous by thread: Re: services
  • Next by thread: Re: services
  • Index(es):
    • Date
    • Thread