]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/mdi.mm
added functions for setting the columns order in wxListCtrl (modified patch 1828074)
[wxWidgets.git] / src / cocoa / mdi.mm
index ef279856ca14194571d921036a0957406db54b04..a0c8022306f1577ff3e8057d4798905db4e6d6b1 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "wx/mdi.h"
 
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
 #ifndef WX_PRECOMP
     #include "wx/log.h"
 #endif // WX_PRECOMP
@@ -44,6 +46,7 @@ WX_DECLARE_HASH_MAP(int, wxMDIChildFrame*, wxIntegerHash, wxIntegerEqual, wxIntM
 - (id)initWithWxMDIParentFrame: (wxMDIParentFrame *)mdiParent;
 - (void)windowDidBecomeMain: (NSNotification *)notification;
 @end // interface wxMDIParentFrameObserver : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxMDIParentFrameObserver,NSObject)
 
 @implementation wxMDIParentFrameObserver : NSObject
 - (id)init
@@ -67,6 +70,7 @@ WX_DECLARE_HASH_MAP(int, wxMDIChildFrame*, wxIntegerHash, wxIntegerEqual, wxIntM
 }
 
 @end // implementation wxMDIParentFrameObserver : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxMDIParentFrameObserver,NSObject)
 
 // ========================================================================
 // wxMDIParentFrame
@@ -79,7 +83,7 @@ void wxMDIParentFrame::Init()
 {
     m_clientWindow = NULL;
     m_currentChild = NULL;
-    m_observer = [[wxMDIParentFrameObserver alloc]
+    m_observer = [[WX_GET_OBJC_CLASS(wxMDIParentFrameObserver) alloc]
             initWithWxMDIParentFrame:this];
     [[NSNotificationCenter defaultCenter] addObserver:m_observer
             selector:@selector(windowDidBecomeMain:)
@@ -232,10 +236,10 @@ void wxMDIParentFrame::WindowDidBecomeMain(NSNotification *notification)
         }
         if(!hashmap.empty())
         {
-            int windowCount = 0;
+            NSInteger windowCount = 0;
             NSCountWindows(&windowCount);
             wxASSERT(windowCount>0);
-            int *windowList = new int[windowCount];
+            NSInteger *windowList = new NSInteger[windowCount];
             NSWindowList(windowCount, windowList);
             wxIntMDIChildFrameHashMap::iterator iter = hashmap.end();
             for(int i=0; i<windowCount && iter == hashmap.end(); i++)