+@interface wxNSMenuNotificationObserver : NSObject
+{
+}
+
+- (void)menuDidAddItem: (NSNotification *)notification;
+- (void)menuDidChangeItem: (NSNotification *)notification;
+- (void)menuDidRemoveItem: (NSNotification *)notification;
+- (void)menuDidSendAction: (NSNotification *)notification;
+- (void)menuWillSendAction: (NSNotification *)notification;
+@end // interface wxNSMenuNotificationObserver
+WX_DECLARE_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject)
+
+@implementation wxNSMenuNotificationObserver : NSObject
+
+- (void)menuDidAddItem: (NSNotification *)notification
+{
+ wxCocoaNSMenu *menu = wxCocoaNSMenu::GetFromCocoa([notification object]);
+ wxCHECK_RET(menu,wxT("menuDidAddItem received but no wxMenu exists"));
+ menu->CocoaNotification_menuDidAddItem(notification);
+}
+
+- (void)menuDidChangeItem: (NSNotification *)notification
+{
+ wxCocoaNSMenu *menu = wxCocoaNSMenu::GetFromCocoa([notification object]);
+ wxCHECK_RET(menu,wxT("menuDidChangeItem received but no wxMenu exists"));
+ menu->CocoaNotification_menuDidChangeItem(notification);
+}
+
+- (void)menuDidRemoveItem: (NSNotification *)notification
+{
+ wxCocoaNSMenu *menu = wxCocoaNSMenu::GetFromCocoa([notification object]);
+ wxCHECK_RET(menu,wxT("menuDidRemoveItem received but no wxMenu exists"));
+ menu->CocoaNotification_menuDidRemoveItem(notification);
+}
+
+- (void)menuDidSendAction: (NSNotification *)notification
+{
+ wxCocoaNSMenu *menu = wxCocoaNSMenu::GetFromCocoa([notification object]);
+ wxCHECK_RET(menu,wxT("menuDidSendAction received but no wxMenu exists"));
+ menu->CocoaNotification_menuDidSendAction(notification);
+}
+
+- (void)menuWillSendAction: (NSNotification *)notification