X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/829a2e9521175cd943d671f16535242a467c4f91..92ab7bed7751a9a7461c9b30e0b3aba7a1d203b1:/src/cocoa/NSMenu.mm

diff --git a/src/cocoa/NSMenu.mm b/src/cocoa/NSMenu.mm
index 18451658af..635b2ee96e 100644
--- a/src/cocoa/NSMenu.mm
+++ b/src/cocoa/NSMenu.mm
@@ -16,7 +16,6 @@
 #endif // WX_PRECOMP
 
 #include "wx/cocoa/NSMenu.h"
-#include "wx/cocoa/ObjcPose.h"
 
 #import <Foundation/NSNotification.h>
 #include "wx/cocoa/objc/NSMenu.h"
@@ -36,6 +35,7 @@
 }
 
 @end // WXNSMenu
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSMenu,NSMenu)
 
 // ============================================================================
 // @class wxNSMenuNotificationObserver
@@ -44,14 +44,13 @@
 {
 }
 
-struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[wxNSMenuNotificationObserver alloc] init];
-
 - (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
 
@@ -91,12 +90,15 @@ struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[wxNSMenuNotificationObse
 }
 
 @end // implementation wxNSMenuNotificationObserver
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject)
 
 // ========================================================================
 // wxCocoaNSMenu
 // ========================================================================
 WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSMenu)
 
+struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[WX_GET_OBJC_CLASS(wxNSMenuNotificationObserver) alloc] init];
+
 void wxCocoaNSMenu::AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags)
 {
     if(cocoaNSMenu)