trouble with services and NSFilenamesPboardType
trouble with services and NSFilenamesPboardType
- Subject: trouble with services and NSFilenamesPboardType
- From: "Martin" <email@hidden>
- Date: Mon, 21 Jul 2003 19:00:46 -0700
Hello,
I've got an application that should expose some services that work on file paths. I've set my app to accept NSSendTypes of NSFilenamesPboardType. Trouble is, the Finder doesn't seem to want to send me my array of paths. For reference, here's the relevant Info.plist entry:
<key>NSServices</key>
<array>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Process Files...</string>
</dict>
<key>NSMessage</key>
<string>doServiceRequest</string>
<key>NSPortName</key>
<string>MyAppName</string>
<key>NSSendTypes</key>
<array>
<string>NSFilenamesPboardType</string>
</array>
</dict>
</array>
I have placed my app in the "Applications" folder. I call NSUpdateDynamicServices after registering my service.
My menu entry correctly appears in the services menu. The menu is enabled and selectable. When I select a file and try to run my service absolutely nothing happens. Nothing appears on the console, my application is not launched. If my app is already running, nothing happens, no console message.
I can get my application to accept NSStringPboardType from various applications, no problem. Just the file paths don't seem to work.
If anyone has had this problem before, or sees something wrong with the above, any help is appreciated, thanks,
~Martin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.