Newbie question about NSOutlineView
Newbie question about NSOutlineView
- Subject: Newbie question about NSOutlineView
- From: James Gillespie <email@hidden>
- Date: Fri, 14 Feb 2003 22:36:25 -0800
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.