[Cocoa] Opening and closing windows

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

  1. macrumors member

    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


    Staff Member

    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. macrumors member

    Thanks, that worked out for me :)

Share This Page