PDA

View Full Version : [Cocoa] Opening and closing windows




Xino
Sep 29, 2008, 03:45 AM
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.



robbieduncan
Sep 29, 2008, 03:57 AM
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.

Xino
Sep 29, 2008, 07:04 AM
Thanks, that worked out for me :)