1
我需要類似「標籤」(iOS)的可可NSWindow。我有一個「錯誤消息」NSWindow。我使用相同的窗口來顯示許多自定義消息。問題是,如果我釋放窗口,這將關閉,所以我需要在NSDictionary中保留對窗口的引用,並且在close操作中,我將釋放相應的錯誤窗口。NSWindow如何設置和獲取標識符
ErrorWindow *controllerWindow = [[ErrorWindow alloc] initWithWindowNibName:@"ErrorWindow"];
[controllerWindow showWindow:self];
[controllerWindow setMessageText: message];
[controllerWindow setInformationText:info];
//If I release the window, it closes.
[controllerWindow release];