Re: get ref to instance from IB
Re: get ref to instance from IB
- Subject: Re: get ref to instance from IB
- From: Graham Cox <email@hidden>
- Date: Tue, 16 Jun 2009 16:15:53 +1000
On 16/06/2009, at 4:00 PM, Ken Thomases wrote:
Actually, I believe a data source has stricter requirements on it
than merely following the memory management rules.
From <http://developer.apple.com/documentation/Cocoa/Conceptual/OutlineView/Articles/UsingOutlineDataSource.html#//apple_ref/doc/uid/20000725-140686
>:
Ah, OK, this is trickier than I thought. Thanks for the correction.
I think there's no getting away from the need for the data source to
maintain all of the objects it vends. It can allocate them lazily,
on demand. The object can be owned by the C++ object, or there can
be a mapping from each C++ object to the corresponding Objective-C
object, or you can maintain an Objective-C data structure that
parallels the C++ data structure.
Yes - I imagined you could probably create an autoreleased wrapper on
the fly for each item requested by the outline view, but it looks like
it's not going to work, more's the pity.
--Graham
_______________________________________________
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