Gerriet M. Denkmann
On 18 Jul 2017, at 00:30, Quincey Morris <email@example.com> wrote:“Works” means that showWindow does indeed show a window.
That the window doesn’t reappear after it’s made to disappear?Yes. After the red button got clicked on the PrefWindow, it never will appear again.
The first time prefController is of course nil.
The next time it is not.
Is there a corresponding line of code that sets self.prefController to nil when the window is closed?No.
Or does the “showWindow” not make the window visible?Exactly: this is the problem.
Does the action method get called at all, after the first time?It gets called.
What kind of object is “self”?App delegate.
How is the “prefController” property declared?strong
How did you hide the window (orderOut: or close)?Clicking the red button.
Is it a NSWindow or a NSPanel?Same problem for both.
Have you made sure the “release on close” checkbox isn’t set in IB?It is not checked.
(But do you really want the prefs controller to hang around when it’s closed? Seems like a waste of memory to me.)Yes. But loading the window again would be a waste of Cpu time.
Not sure what is worse.