• 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: Replacing objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing objects


  • Subject: Re: Replacing objects
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 22 Dec 2008 19:39:22 -0600

On Dec 22, 2008, at 6:55 PM, Mike Abdullah wrote:

No, the whole point is that although the proxy descends from a different hierarchy, no-one outside the proxy need know this. All other code treats it as though it were a non-proxy object of the expected class. Whenever one of the class's methods gets called, the proxy object receives a -methodSignatureForSelector: call, followed by -forwardInvocation:

Just so everybody knows: for code which will be running on Leopard or later, and when you're building a plain forwarding proxy, it is better (and simpler) to provide an implementation of the following method rather than using -methodSignatureForSelector: and -forwardInvocation: for forwarding:


- (id)forwardingTargetForSelector:(SEL)sel;

See the note "New forwarding fast path" in the Foundation release notes <http://developer.apple.com/ReleaseNotes/Cocoa/Foundation.html>.

Cheers,
Ken

_______________________________________________

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


References: 
 >Re: Replacing objects (From: WT <email@hidden>)
 >Re: Replacing objects (From: "Kyle Sluder" <email@hidden>)
 >Re: Replacing objects (From: WT <email@hidden>)
 >Re: Replacing objects (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Replacing objects
  • Next by Date: observeValueForKeyPath and how to do it right
  • Previous by thread: Re: Replacing objects
  • Next by thread: Re: Replacing objects
  • Index(es):
    • Date
    • Thread