[Cocoa] Opening and closing windows

Discussion in 'Mac Programming' started by Xino, Sep 29, 2008.

  1. macrumors member

    Sep 5, 2008
    I've created an application with multiple windows. Some windows doesn't open when the application starts because I said not to.

    I want to open these windows by selecting a menu item like "Preferences...". With "orderFront" I'm able to do so but when I close the window after opening it and reopen it again, the application crashes.

    How can I reopen a window after closing it? The function "orderFront" makes the application crashing.
  2. Moderator emeritus


    Jul 24, 2002
    Have you set the window to get released on close in Interface Builder? If so that's your problem: when you close it it gets released out of memory so next time you try and use it crash city.
  3. thread starter macrumors member

    Sep 5, 2008

Share This Page