Nothing Displays in the tableView


#1

In the SpeakLine project, everything seems to work: clicking “Speak” causes the text to be spoken, the “Speak” button is disabled while it is speaking, the “Stop” button is disabled when not speaking, enabled while speaking & serves to stop the speech. Everything works except the tableView never displays anything. I have checked and rechecked my code, checked and rechecked all of my connections, and they appear to be correct. Any suggestions as to what I have done wrong?

I am using Xcode 3.2.6 under Lion 10.7.2 on a 20" iMac.


#2

I had this issue as well until I moved the initialization of the voicelist into the awakeFromNib method:

- (void)awakeFromNib { // When the table appears on the screen, the default voice // should be selected voiceList = [NSSpeechSynthesizer availableVoices]; NSString *defaultVoice = [NSSpeechSynthesizer defaultVoice]; int defaultRow = [voiceList indexOfObject:defaultVoice]; [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:defaultRow] byExtendingSelection:NO]; [tableView scrollRowToVisible:defaultRow]; [tableView reloadData]; }