Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding to an applications menu.



On 03 Sep 07, at 01:41, Ben Spink wrote:
This should be an easy question.

To be brief: it's not.

I need to add a new item under the "Go" menu in the OS X Finder. My client has stipulated this, otherwise I would not do so. I have tried to talk them out of it, but so far no luck.

I have edited the objects.xib file contained in /System/Library/ CoreService/Finder.App/Contents/Resources/English.lproj/Menus.nib/.

I added my new entries in there, picked an ID that did not appear to be used (716), assigned a key, but what do I do with the "command" entry? If I leave it as is, it launches the command I copied instead of doing something I want. I assume there is some listener that is catching all events generated by the menu. Can I hook into that in some way?

Is it possible to register a command to launch a specific application on the machine? Or launch a specific path?

Unless you have access to the Finder source code - which I'm pretty sure you don't - you can't add commands. If the Finder is working anything like the programs which I've been familiar with, those IDs are being handled in a big switch() statement (or something similar) deep within its code.


So no: there's no way you can edit the Finder's interface. And you definitely shouldn't - Apple reserves the right to change the way it works internally, and in fact I'm pretty certain[1] that under Leopard, the Finder will work entirely differently. (Everything I've heard has suggested that it's been heavily rearchitected, and there's a significant chance it's no longer even using Carbon anymore.)

[1] Based on what I've seen on Apple's web site, nothing more.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Adding to an applications menu. (From: Ben Spink <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.