Re: Stop NSScrollView from catching scroll events.
Re: Stop NSScrollView from catching scroll events.
- Subject: Re: Stop NSScrollView from catching scroll events.
- From: Michael Ash <email@hidden>
- Date: Tue, 24 Mar 2009 10:46:30 -0400
On Tue, Mar 24, 2009 at 1:12 AM, Kyle Sluder <email@hidden> wrote:
> On Mon, Mar 23, 2009 at 10:48 PM, Michael Ash <email@hidden> wrote:
>> Right, that would be my preferred way of doing it. I like to use the
>> NSObject methods rather than the ObjC runtime functions where I can,
>> since the NSObject methods are usually friendlier and more broadly
>> compatible.
>
> For the record, I agree with Mike on this point; had I remembered the
> method, I would have used it too. I happened to be in the ObjC
> runtime docs looking up the signature for method_getImplementation, so
> I went with the runtime function.
>
> The advantage of using +instanceMethodForSelector: is that classes can
> override it to seamlessly provide forwarded method implementations,
> for example to a delegate.
Actually, message forwarding using -forwardInvocation: or
-forwardingTargetForSelector: will still work either way. Both the
ObjC runtime function and this method will return a pointer to the
Magical Forwarding Trampoline which objc_msgSend() uses to do
forwarding, so you get the same results either way.
Mike
_______________________________________________
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