开发者

How to auto close modal window in Cocoa?

开发者 https://www.devze.com 2022-12-17 08:30 出处:网络
I tried this but my program crashed. - (void)windowWillClose:开发者_JAVA技巧(NSNotification *)notification

I tried this but my program crashed.

- (void)windowWillClose:开发者_JAVA技巧(NSNotification *)notification
{
    [modalWindow orderOut:self];
    [NSApp stopModal];
}


Most likely, modalWindow is not pointing to a valid object. That's the only obvious thing that would crash in those two lines. You should be able to use the debugger to find out more about why it's crashing before asking for help.

0

精彩评论

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