tags:

views:

300

answers:

1

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
Above is not working for me. Showing following error error: 'myWindow' undeclared (first use in this function)
Shakti
The point was: call `close` or `performClose:` on your front window.
Georg Fritzsche