Lenar Hoyt
Lenar Hoyt

Reputation: 6159

loadCibName: Difficulties

I load a xib doing this:

[contentViews addObject:[[HMUISettingsViewController alloc] initWithNibName:"SettingsView" bundle:nil]];

In SettingsView.xib file owner is HMUISettingsViewController. One outlet of HMUISettingsViewController is calendarTableView, but the problem is: it's always non-existent if I try to access it. This is an excerpt of the HMUISettingsViewController class:

- (void)awakeFromNib
{   
    // Set delegate for resizing
    [mainSplitView setDelegate:self];
}

- (void)splitView:(NSSplitView)sender resizeSubviewsWithOldSize:(NSSize)oldSize
{
    var calendarTableFrame = [calendarTableView frame]; // Doesn't work!
}

Upvotes: 0

Views: 26

Answers (1)

Piotr Justyna
Piotr Justyna

Reputation: 4996

Have you bound your outlet to an actual calendar table view in the xib file?

Upvotes: 1

Related Questions