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: kEventMenuPopulate and CM root menu in Leopard




On Oct 29, 2007, at 4:14 PM, Dragan Milić wrote:

Hello all,

In my Finder CM plug-in, I'm using kEventMenuPopulate menu kind event to dynamically modify the CM's contents, add icons to menu items etc. That's a known technique, even presented in Apple's SampleCM source code. However, that functionality seems to be broken in Leopard.

In Tiger (and Panther) that worked with all the menus I added myself either using AEDesc, AERecord and AEDescList instances, or adding them dynamically as shown in the sample code. But it also worked for the root menu of the CM (I need to dynamically change name and add submenu to one menu item in the CM's root). In Leopard, kEventMenuPopulate still works for all other menus, but not for the root menu of the CM, or better said, it's not root menu anymore, now its submenu of the root menu item titled "More". kEventMenuPopulate seems not to be sent when that submenu is to be populated! That completely breaks a particular feature of my plug-in.

I assume you some of you know what has changed in a way CM plug-ins are treated in Leopard. I was trying to find any information about that in release and technical notes about Leopard, but I was unable to find anything. Perhaps I didn't look good enough. Can you please point out to some document or anything else which will guide me in how to catch kEventMenuPopulate for CM root menu item "More"? I remember that I read somewhere (mailing list?) that there would be changes in the way Leopard works with third party CM plug-ins, but I couldn't find any more info on that matter.

I think what probably happened is that Finder changed the way that it displays contextual menus in Leopard. As you noticed, Finder now displays the contextual menu items as a submenu of its main menu.


I do believe that kEventMenuPopulate should be sent to the submenu before it is opened. Have you tried using DebugTraceEventByName("kEventMenuPopulate", 1) from within gdb to see if the event is being sent?

-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >kEventMenuPopulate and CM root menu in Leopard (From: Dragan Milić <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.