Re: NSTableView _dataSourceValueForColumn:row: failure
Re: NSTableView _dataSourceValueForColumn:row: failure
- Subject: Re: NSTableView _dataSourceValueForColumn:row: failure
- From: Corbin Dunn <email@hidden>
- Date: Fri, 12 Mar 2010 15:25:03 -0800
On Mar 11, 2010, at 7:55 PM, Alexander Bokovikov wrote:
>
> On 11.03.2010, at 23:25, Corbin Dunn wrote:
>
>> http://www.corbinstreehouse.com/blog/2008/08/your-most-important-breakpoint-in-cocoa/
>
> I've done what was told there. No difference. I just get EXC_BAD_ACCESS in XCode status line and debugger's call stack list shows:
>
> objc_msgSend
> - [NSTableView _dataSourceValueForColumn:row: ]
> ........
>
> and a long chain is below, but there are no "my" project lines there. All lines are from Cocoa itself. It looks like the window requires for update after dataSource is already released.
it still could be caused by something you did. It is hard to say! I'd have to see the bt (like I mentioned earlier).
>
> This is how I call the modal window:
>
> - (void) doModalWnd{
> MyWnd *wnd = [[MyWnd alloc] init];
> [[NSApplication sharedApplication] runModalForWindow:[wnd window]];
> [wnd release];
> }
>
> - (IBAction) myBtnClick:(NSButton *)sender {
> [self performSelector:@selector(doModalWnd)
> withObject:nil
> afterDelay:0];
> }
>
> There is such code within MyWnd.m:
>
> - (void)windowWillClose:(NSNotification *)notification {
> [[NSApplication sharedApplication] stopModalWithCode:NSCancelButton];
> }
>
> Is there anything criminal here?
>
something's causing something to redraw the table after your datasource was dealloced. Just call [tableView setDatasource:nil] in your datasourc'es dealloc. That will probably fix the issue.
.corbin
> Thanks.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden