i want to close the front window of my application. can anybody help me?
+2
A:
Try [myWindow close]
or [myWindow performClose:nil]
.
Use [NSApplication keyWindow]
to get the key window if needed. If you want just the front-most one, grab the first one from [NSApplication orderedWindows]
.
Georg Fritzsche
2009-12-08 12:49:29
Above is not working for me. Showing following error error: 'myWindow' undeclared (first use in this function)
Shakti
2009-12-09 09:08:43
The point was: call `close` or `performClose:` on your front window.
Georg Fritzsche
2009-12-09 11:45:34