Re: Dynamically subclassing an observed object
Re: Dynamically subclassing an observed object
- Subject: Re: Dynamically subclassing an observed object
- From: Kyle Sluder <email@hidden>
- Date: Wed, 13 Oct 2010 14:47:23 -0700
On Wed, Oct 13, 2010 at 2:02 PM, Dave DeLong <email@hidden> wrote:
> As for the rationale behind why I need to do this, I'll just refer to my blog post on the matter: http://davedelong.com/blog/2010/10/07/fun-objective-c-dynamic-subclassing
Funny enough, it sounds like the blog post I linked you to (and the
ones following it) that talks about MAZeroingWeakRef does precisely
what you need: http://www.mikeash.com/pyblog/introducing-mazeroingweakref.html
You can find Mike's code on github.
Alternatively, you could go back to the NSMapTable approach, but
instead of using an NSMapTable use a CFDictionary with custom
callbacks.
--Kyle Sluder
_______________________________________________
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