|Jun 24, 2009, 08:19 PM||#1|
Opening a Window
I want the user to be able to open a window from another xib file by clicking a button. I created an NSWindowController subclass. It has an open: action connected to the button, its window is connected to the window, and it is the File Owner of the xib containing the window. The open: method calls loadWindow and showWindow:, but the window does not appear.
The problem appears to be that the window variable shows up as 0x0. Why is it nil, and how can I fix it?
I know that I have been using this forum as a crutch for what I do not know about development. Please bear with me, as I am coming from iPhone programming - where I insisted on programmatically creating interfaces.
Gravita - a gravity simulation.
Available for Mac at http://www.thebluekoala.com
|Jun 24, 2009, 08:20 PM||#2|
How are you initializing the window controller in code? Are you passing it the correct nib name? Oh, and don't call loadWindow (see the docs). You just need to init the controller with the right nib name, and call showWindow:
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|"Create a Windows 7 install disk"||winks360||Windows, Linux & others on the Mac||19||Aug 22, 2012 03:47 PM|
|Lion not remembering open Finder Windows?||gumbyx84||Mac OS X 10.7 Lion||1||Aug 14, 2011 05:21 PM|
|Open Duplicate Window (xcode)||Ipodize||Mac Programming||3||May 16, 2011 09:47 PM|
|For some reason when i open dictionary it opens multiple windows||DAAAAAAAVE||Mac Applications and Mac App Store||9||Oct 5, 2009 09:23 AM|
|Clicking safari dock open to open new window?||toxicquack||Mac Applications and Mac App Store||9||Aug 3, 2009 02:39 AM|
All times are GMT -5. The time now is 04:02 AM.