Re: [Help] NSTableDataSource and EXC_BAD_ACCESS
Re: [Help] NSTableDataSource and EXC_BAD_ACCESS
- Subject: Re: [Help] NSTableDataSource and EXC_BAD_ACCESS
- From: Ronaldo Nascimento <email@hidden>
- Date: Thu, 19 Jul 2001 09:51:19 -0400
Well I did some tests and it calls
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
60 times
and
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
16 times
and this is on startup, so it seems like alot.
Also examination of the stack does not show any recursion.
From what I understand of ObjC is that objc_msgSend is the actual C call
to send an object a message. And the previous stack item is a call:
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
of which the last item is [mylist count];
Examination of the variables shows that MyDataSource is out of scope?!?!
But the mylist (NSArray) has a valid address.
On Wednesday, July 18, 2001, at 05:58 PM, Erik M. Buck wrote:
You probably have infinite recursion. Set a break point in one of the
interesting methods before you start running. If you hit the break point
over and over, that is a clue. It is easy to get infinite recursion in
the
delegate methods of table views etc. There are some methods that should
not
be called from a table delegate method (including display) because doing
so
calls the delegate again and so on.
Ronaldo Nascimento
VP of Technology, NetProof Systems
http://www.netproof.com