Ok, I have two windows, A
and B
. When I click a button on Window A
, I want it to close and take the user to Window B
. makeKeyAndOrderFront
does a great job of activating Window B
, but how do you get it to then close Window A
?
views:
38answers:
1
+4
A:
Send window A a close
or performClose:
message (depending on whether you want to emulate the user closing the window, which is the latter, or simply close it immediately and unconditionally).
Note that closing the window may release it; see the releasedWhenClosed
property, which has a checkbox in IB and may already be turned on there. You may want to order the window out (as compared to ordering in, such as by ordering front) instead.
Peter Hosey
2009-11-29 12:51:02