Reputation: 64834
I'm invoking the same IBAction from 2 different xib files (the main window and the main menu).
- (IBAction)showEditor:(id)sender
{
... [document mainWindow];
}
However, mainWindow is null when I invoke showEditor from the menu. But i don't understand:bBoth xib files are initialized when the apps starts, so everything should be initialized when I click on the menu item.
thanks
Upvotes: 0
Views: 71
Reputation: 80273
Maybe document
is also null? That would explain why [document mainWindow]
is null. See if your two instances of document
are the same.
Upvotes: 1