Can't Figure This Out NSScrollView not NSTableView


#1

This problem has been asked and answered, but I can’t seem to get it to work. I’m asking it again so that it will be bumped.

I’m getting the same error saying that I’m sending a selector to a NSScrollView instead of a NSTableView but everything seems to be defined correctly. Here’s my SpeakLineAppDelegate.h

@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSTextField *textField;
@property (weak) IBOutlet NSTableView *tableView;

It seems to be an NSTableView but the error says that its a NSScrollView. Here’s the debugging messages

2012-10-07 20:56:13.496 SpeakLine[2624:303] init
2012-10-07 20:56:17.033 SpeakLine[2624:303] Here we are ta da
2012-10-07 20:56:17.034 SpeakLine[2624:303] -[NSScrollView selectedRow]: unrecognized selector sent to instance 0x1006071e0
2012-10-07 20:56:17.034 SpeakLine[2624:303] -[NSScrollView selectedRow]: unrecognized selector sent to instance 0x1006071e0

Here’s my synthesize statements

@synthesize textField = _textField;
@synthesize tableView = _tableView;

And here is where the error is generated.

-(void)tableViewSelectionDidChange:(NSNotification *)notification {
NSLog(@“Here we are ta da”);
NSInteger row = [_tableView selectedRow];
if (row == 1) {
return;
}
NSString *selectedVoice = [_voices objectAtIndex:row];
[_speechSynth setVoice:selectedVoice];
NSLog(@“new voice = %@”, selectedVoice);
}

I added the ta da line because I’m still learning XCode IDE stuff and that is the way I learned to debug to see how far I’m getting. I’m also getting an error from the awakeFromNib method, but I’ve commented that out. Now there is one thing that happened. When I first did the control click drag to make the IBOutlet it did create an NSScrollView but I changed that by hand to NSTableView. I’ve actually deleted all these lines and saved the files then retyped them in. I can’t see what is causing this to happen.

I’m using OSX.8.2 Lion, and I just today updated my XCode to 4.5.1 so it is a little newer XCode version than what is used in the book.

Thanks for any help you can give a newbie learner.