开发者

Why can't I access the NSApp global variable from a controller?

开发者 https://www.devze.com 2023-04-04 06:48 出处:网络
I am inside of a controller, and would like to access and close the currently displayed mainWindow.But when I try:

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消