Re: Crash in datasource method when closing document

2013-10-15 Thread Michael Babin
On Oct 10, 2013, at 12:06 AM, Shane Stanley wrote: > The problem I'm having is that if I open a file, then add an item, say a > folder, then click the close button and choose Revert Changes, I (nearly > always) get an exception thrown on the outline view's datasource method > -outlineView:obje

Re: Crash in datasource method when closing document

2013-10-10 Thread Sean McBride
On Wed, 9 Oct 2013 23:10:18 -0700, Jerry Krinock said: >> I'm using ARC. > >ARC doesn't help for KVO observers, notification observers, delegates, >manual bindings, or data sources. These must still be managed manually. > >* * * > >Here is some typical code "tear down" code. This is for a tabbed

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley
On 10 Oct 2013, at 10:56 PM, Michael Babin wrote: > outlet connected? Problem solved... -- Shane Stanley 'AppleScriptObjC Explored' ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley
On 10 Oct 2013, at 9:51 PM, Michael Babin wrote: > From your description, it appears that you're presenting a window/sheet when > the window is asked to close (Save/revert changes?). When the revert option > is selected, what changes occur to the underlying data supporting the outline > view?

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 6:45 AM, Shane Stanley wrote: > > On 10 Oct 2013, at 9:39 PM, Michael Babin wrote: > >> Given the use of the data source protocol to provide the data to the outline >> view and the "Revert Changes" option, my first suspect would be the data >> provided to the outline view

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley
On 10 Oct 2013, at 9:39 PM, Michael Babin wrote: > Given the use of the data source protocol to provide the data to the outline > view and the "Revert Changes" option, my first suspect would be the data > provided to the outline view. Perhaps the underlying data has changed and the > outline

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 12:06 AM, Shane Stanley wrote: > I have a document-based app, and it saves as a package. The document's window > contains an outline view, where the user can drag items from the Finder or > create new folders, and these will be saved to the package. I'm creating file > wrap

Re: Crash in datasource method when closing document

2013-10-09 Thread Shane Stanley
On 10 Oct 2013, at 5:39 PM, Jerry Krinock wrote: > In order to receive -windowWillClose:, the object implementing it must be the > delegate of the window which is closing. Yes, I already had -windowWillClose: implemented in my window controller (and -windowShouldClose:), and it gets called fi

Re: Crash in datasource method when closing document

2013-10-09 Thread Jerry Krinock
On 2013 Oct 09, at 23:33, Shane Stanley wrote: > One of the first things I tried was putting a breakpoint on -windowWillClose: > The thing is, it doesn't get that far -- the breakpoint is never hit. In order to receive -windowWillClose:, the object implementing it must be the delegate of the

Re: Crash in datasource method when closing document

2013-10-09 Thread Shane Stanley
On 10 Oct 2013, at 5:10 PM, Jerry Krinock wrote: > Issues like this often crop up as soon as you try to make an app which his > more complicated than Apple Sample Code :)) Yep. The curious thing is I've been working on this for some time, and it's only just cropped up. Now it might be that I

Re: Crash in datasource method when closing document

2013-10-09 Thread Shane Stanley
On 10 Oct 2013, at 5:09 PM, Kyle Sluder wrote: > A great place to start would be to actually look at and post what the > exception says… Yep. EXC_BAD_ACCESS (code=EXC_I386_GPFLT). It's happening on: - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tabl

Re: Crash in datasource method when closing document

2013-10-09 Thread Jerry Krinock
On 2013 Oct 09, at 22:06, Shane Stanley wrote: > click the close button and choose Revert Changes, I (nearly always) get an > exception thrown on the outline view's datasource method > -outlineView:objectValueForTableColumn:byItem: Issues like this often crop up as soon as you try to make an

Re: Crash in datasource method when closing document

2013-10-09 Thread Kyle Sluder
> On Oct 9, 2013, at 10:06 PM, Shane Stanley wrote: > > The problem I'm having is that if I open a file, then add an item, say a > folder, then click the close button and choose Revert Changes, I (nearly > always) get an exception thrown on the outline view's datasource method > -outlineView:o