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.

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?

Thanks.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to