I have a very simple ASOC project that has one window. If the user clicks the red close button on accident, they will have to quit the program entirely and then re-launch it to make the window re-appear. I’ve looked through IB but I’m not seeing anywhere that will bring the window back if the user clicks the logo in the dock (which is what I would like to happen.) I would try to use the documentation, but I don’t even know what to call what I’m trying to do! :o
Any help would be appreciated! And sorry for the noob question!
The behavior of document based applications and non-document based applications is different.
The latter will do nothing after calling applicationOpenUntitledFile
I tested it to be certain, and I’m sorry to say that what you say is not true, at least it isn’t in Leopard. applicationDidBecomeActive: did only get called on launch, applicationOpenUntitledFile: did however get called every time the dock-icon was clicked and no window was visible. Maybe this behavior is different in Snow Leopard, but I hardly doubt it.
Indeed you’re right, applicationOpenUntitledFile: will be called every time the dock icon is clicked but in an non-document based app the main window won’t be opened. applicationDidBecomeActive: will be called every time the app becomes frontmost for instance when you press twice ⌘⇥