• 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: With What does Apple Swizzle the IsA-pointer in KVO?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: With What does Apple Swizzle the IsA-pointer in KVO?


  • Subject: Re: With What does Apple Swizzle the IsA-pointer in KVO?
  • From: Philip Mötteli <email@hidden>
  • Date: Fri, 23 Nov 2007 17:03:15 +0100

Am 23.11.2007 um 15:54 schrieb Clark Cox:

On Nov 23, 2007 5:42 AM, Philip Mötteli <email@hidden> wrote:


Apple says, that it uses IsA-swizzling as the underlying technology to
implement KVO.
What are/is the class(es), which replace the original class of the
observed object? Is it an NSProxy subclass? Different NSProxy
subclasses, depending on the observed object? Is it a direct subclass
of the observed object?


Perhaps I could provide more help if you
stated why it is that you think that you need to know this.

I need to know, when an object has changed and I would prefer to reuse as much as possible, of what KVO already offers.
Unfortunately, KVO is based on the internals of an object (which should be assumed as being hidden in OOP). So if I want to observe an object that either doesn't have any declared IVar, like e. g. NSString and many others, or does not have a corresponding IVar, because it is not a simple setter method, like -finalize or -dealloc, I have a problem.
Ideally, I just want to implement a plug-in, that reuses the functionality, offered by KVO, but extends it, so that the publicly accessible part of an object can be observed instead of the hidden internals.
I presume, I can do that, by implementing my own proxy, that prevents KVO to do an IsA swizzling, by implementing - automaticallyNotifiesObserversForKey:. But I would have liked to reuse the method forwarding mechanism of KVO._______________________________________________


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: With What does Apple Swizzle the IsA-pointer in KVO?
      • From: "Clark Cox" <email@hidden>
    • Re: With What does Apple Swizzle the IsA-pointer in KVO?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >With What does Apple Swizzle the IsA-pointer in KVO? (From: Philip Mötteli <email@hidden>)
 >Re: With What does Apple Swizzle the IsA-pointer in KVO? (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: Overlapping Views
  • Next by Date: Re: replacing NSViewAnimation with CoreAnimation
  • Previous by thread: Re: With What does Apple Swizzle the IsA-pointer in KVO?
  • Next by thread: Re: With What does Apple Swizzle the IsA-pointer in KVO?
  • Index(es):
    • Date
    • Thread