Why can't I access the NSApp global variable from a controller?
I am inside of a controller, and would like to access and close the currently displayed mainWindow. But when I try:
[NSApp mainWindow] close];
not开发者_如何转开发hing happens. So how do I access it?
I needed to use something like:
[[NSApp delegate] closeFilePanel];
精彩评论