Re: NSServices
Re: NSServices
- Subject: Re: NSServices
- From: Ondra Cada <email@hidden>
- Date: Fri, 27 May 2005 05:33:14 +0200
Chad,
On 27.5.2005, at 5:02, Chad Armstrong wrote:
Any good suggestions on how to integrate NSServices into an
application. Of two books I've looked through (Cocoa Applications
and Cocoa Programming by Anguish/Yachtman, etc.) they seem to
approach NSServices differently so I'm a little murky on how to
attack things first. Can it be as simple as just editing the
app's .plist, or is there generally a decent amount of internal
programming, too?
To use Services as client, you don't need to do anything (well, it is
a bit more complicated, but generally Cocoa classes do well; check
also registerServicesMenuSendTypes:returnTypes:,
validRequestorForSendType:returnType:, and
writeSelectionToPasteboard:types:.
To provide Services as server, you need
(a) to set up the plist (NSMenuItem, NSPortName, NSMessage,
NSSendTypes, NSReturnTypes);
(b) to implement appropriate methods:
-setServicesProvider: -- registes the object which provides
Services
-<service name>:userData:error: -- sent to the Provider.
(the <service name> is set up in the plist as NSMessage).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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
References: | |
| >NSServices (From: Chad Armstrong <email@hidden>) |