This is my first Mac OS-X app, so this might be a stupid question. In my app basically i have two windows,
- The Main window which comes with MainMenu.xib file by default
- I created another WindowController with another xib file.
I have created a AppController class which is connected to the MainMenu.xib, what i am trying to do in the awakeFromNib
method in the AppController class is load either the main Window or the custom window, but load the Main Menu each time. Is it possible?
I couldn't do it the previous way, if i needed to use the custom window, i would first create the main window and close it immediately.
I tried to get the main window by this, [[NSApplication sharedApplication]mainWindow];
and then closing it. But was unsuccessful.
I dont think i have proper understanding yet with windows, views and controllers of cocoa. i am following aaron hillegass's COCOA Programming for Mac OS X book. please suggest me some other tutorials so that i can understand this thing clearly.