Re: Replacing objects
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