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
Maybe
documentis also null? That would explain why[document mainWindow]is null. See if your two instances ofdocumentare the same.