• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamically subclassing an observed object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Dynamically subclassing an observed object
      • From: Dave DeLong <email@hidden>
References: 
 >Dynamically subclassing an observed object (From: Dave DeLong <email@hidden>)
 >Re: Dynamically subclassing an observed object (From: Ken Thomases <email@hidden>)
 >Re: Dynamically subclassing an observed object (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: Dynamically subclassing an observed object
  • Next by Date: Re: Dynamically subclassing an observed object
  • Previous by thread: Re: Dynamically subclassing an observed object
  • Next by thread: Re: Dynamically subclassing an observed object
  • Index(es):
    • Date
    • Thread