Re: Newbie question about NSOutlineView
Re: Newbie question about NSOutlineView
- Subject: Re: Newbie question about NSOutlineView
- From: Edwin Zacharias <email@hidden>
- Date: Fri, 14 Feb 2003 23:08:25 -0800 (PST)
NSTableView and NSOutlineView don't keep an internal
cache, so they call their dataSource methods many,
many times. You will want to cache your data for
speed and to keep it from getting prematurely
deallocated.
- Edwin
--- James Gillespie <email@hidden> wrote:
>
I am trying to use an NSOutlineView to display some
>
data. My
>
datasource method outlineView:child:ofItem returns
>
an object that is
>
auto released.
>
For example:
>
>
- (id)outlineView:(NSOutlineView *)outlineView
>
child:(int)index
>
ofItem:(id)item {
>
return [[[MyProxyData alloc] initWithStuff:stuff]
>
autorelease];
>
}
>
>
The problem is that the NSOutlineView does not seem
>
to retain the
>
returned object. When it is passed back to my
>
datasource and I access
>
it the app crashes. Is the correct behavior for
>
NSOutlineView? Is
>
there any way to have the NSOutlineView retain this
>
item and release it
>
when it is done?
>
>
Any help is greatly appreciated.
>
Thanks,
>
James Gillespie
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.