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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to