开发者

NSWindowController problem

开发者 https://www.devze.com 2023-02-01 19:15 出处:网络
I created a NSWindowController(.m.h) in a cocoa project. I set the outlet o开发者_运维技巧f the NSWindowController as the window(NSWindow) in MainMenu.xib,

I created a NSWindowController(.m.h) in a cocoa project. I set the outlet o开发者_运维技巧f the NSWindowController as the window(NSWindow) in MainMenu.xib,

I found that the functions in NSWindowController.m below

- (BOOL)isWindowLoaded;
- (void)windowWillLoad;
- (void)windowDidLoad;
- (id)initWithWindow:(NSWindow*)window;

only

- (id)initWithWindow:(NSWindow*)window;

was triggered, and the value of the parameter window is 0x0.

I do not what caused this happen.

Welcome any comment.

Thanks

interdev


You need to set NSWindow's delegate connection to point to your controller, otherwise it won't receive those events.

0

精彩评论

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