> On 2014 Nov 07, at 16:02, Greg Parker <[email protected]> wrote:
> 
> You may have better luck tracing it from the other side. Run to that line in 
> appendToRecentSearches:, set a breakpoint on -[NSNotificationCenter 
> postNotificationName:object:userInfo:], and step over your line. At those 
> breakpoints you should be able to see the notification parameters in the 
> parameter registers, assuming the notification is sent every time that line 
> runs.

Great idea, Greg.  It worked.

It told me that that setting recent searches in this menu posts 122 
notifications, 120 of which are due to building the search field’s popup menu.

• 40 NSMenuDidAddItemNotification, one for each item in the search field’s 
popup menu
• 20 NSMenuDidChangeItemNotification, which are mixed in with the above, for 
items that changed.
• 1 NSUserDefaultsDidChangeNotification.
• 1 NSAutosavedRecentsChangedNotification
• 40 NSMenuDidAddItemNotification, same as before.
• 20 NSMenuDidChangeItemNotification, same as before

However, nowhere in *my* code do I directly create an observer of any of those 
four notification names.  So I’m still head-scratching.

If anyone has any idea what disappearing objects in AppKit might be observing 
these notifications, let us know.
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to