why is numbersOfRowInTableView called before awakeFromNib?
why is numbersOfRowInTableView called before awakeFromNib?
- Subject: why is numbersOfRowInTableView called before awakeFromNib?
- From: "Mark's Studio" <email@hidden>
- Date: Sat, 17 Nov 2001 13:57:00 +0100
- Resent-date: Mon, 19 Nov 2001 18:14:48 +0100
- Resent-from: "Mark's Studio" <email@hidden>
- Resent-message-id: <email@hidden >
- Resent-to: email@hidden
- (int)numberOfRowsInTableView:(NSTableView *)theTableView
{
if(theTableView==myTableView){
return 24;
else
return [tableViewRows objectAtIndex:[tableViews
indexOfObject:theTableView]];
}
tableViewRows, tableViews is set up in awakeFromNib
but numberOfRowsInTableView is called before awakeFromNib
so i get an error.
-[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)
I thought awakeFromNib was called just after the nib file was loaded
but before anything was displayed and numberOfRowsInTableView
was called just before a tableView was displayed?
also why is numberOfRowsInTableView
called 4 times for myTableView
before i get the error.
It's like numbersOfRowInTableView is called a million times to much,
what controlles when it's called?
If i want to owerwrite something in NSTableView
so it only calls numbersOfRowInTableView when the data source is changed
what should that be and how?
Thanks
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden