0

我有两个窗口,1 个主菜单和我添加的1 个窗口

我点击主菜单窗口上的按钮后打开第二个窗口

myWindowController *w = [[myWindowController alloc] initWithWindowNibName:@"myWindow" owner:self]];
[w showWindow:self];

我在myWindowController中有公共方法,它填充所有控件

[w.populateControls];

如果我从 window2 awakeFromNib填充控件,则控件显示正常

不是来自

[w.populateControls];   // in mainMenu

我做错了什么?

4

0 回答 0