Re: [Pyobjc-dev] Attempt at writing Cocoa services with pyobjc
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-01-06 17:24:09
|
On Monday, Jan 6, 2003, at 10:53 US/Eastern, Jack Jansen wrote: > For instance, in the plist file you have the NSServices dict, which > maps menu entries to calls to be made in the service. I assume that > the mapping from <string>doPythonExec</string> to > doPythonExec:userData:error: is defined somewhere, right? But it looks > as though I miss an argument? Or does the NSServiceFunc magic have > something to do with this? And what is the NSPortName=PythonService > used for? The port name is the name assigned to the mach port upon which the inbound services request arrives. It is an implementation detail. The method mapping is a standard part of the services mechanism. The method name you pass has the additional arguments tacked on the end. Basically, the services mechanism is unchanged from the NeXT days. Given Rendezvous, I would expect to see some fairly major changes in the way services are implemented on the system. Also, the services menu is *really* annoying -- have to traverse through at least two levels, often three, to get to the item you want. When implementing services aware applications, I recommend duplicating the services menu as a dock menu, as well. The dock menu cannot directly act on the active selection in the active app-- simply requires that the user hit cmd-c before hitting the menu and cmd-v afterwords (depending on what is appropriate). The dock menu also allows the user to interact with the app in a more robust/complete fashion than does services. Documentation on various services -- first is specific to NSServices, the rest are loosely related: file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ ProgrammingTopics/SysServices/index.html file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ ProgrammingTopics/Workspace/index.html file://localhost/Developer/Documentation/Cocoa/TasksAndConcepts/ ProgrammingTopics/NetServices/index.html b.bum |