I'm not sure if I totally understand the concept of File's owner. So I have a question about this.
As I understand it, the File's owner is the link from a nib to the outside.
And one way is to set the controller of the nib to the file's owner. Is that correct?
For example, if I have a menu item that opens a dialog from another nib, then I can respond to a click on that menu item like so in order to show a dialog for converting numbers between different base systems:
So here an instance of the ConvertNumberToBaseController is set as the file's owner of the corresponding ConvertNumberToBase nib.
Would that be correct?
As I understand it, the File's owner is the link from a nib to the outside.
And one way is to set the controller of the nib to the file's owner. Is that correct?
For example, if I have a menu item that opens a dialog from another nib, then I can respond to a click on that menu item like so in order to show a dialog for converting numbers between different base systems:
Code:
-(IBAction) showConvertNumberToBaseDialog:(id)sender {
convertNumberToBaseController = [[ConvertNumberToBaseController alloc] init];
if (![NSBundle loadNibNamed:@"ConvertNumberToBase"
owner:convertNumberToBaseController])
{
NSLog(@"Error loading Nib for ConvertToBase dialog!");
}
}
So here an instance of the ConvertNumberToBaseController is set as the file's owner of the corresponding ConvertNumberToBase nib.
Would that be correct?