Modal Window

Discussion in 'Mac Programming' started by sivaprakash, Apr 28, 2011.

  1. macrumors member

    Joined:
    Mar 10, 2011
    Location:
    Chennai, India
    #1
    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]]; 
    
    
     
  2. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2

Share This Page