Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sivaprakash

macrumors member
Original poster
Mar 10, 2011
52
0
Chennai, India
I am just trying to make my Window as a modal window (that is parent window should not be accessed once this window is launched)

Is this code would do? Anything wrong in this

Code:
m_myWindowController = [[MyWindowController alloc] initWithWindowNibName:@"Settings"];    
[m_myWindowController close];    
 [[m_myWindowController window] setParentWindow:self.window];  
[NSApp runModalForWindow:[m_myWindowController window]];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.