Re: Programmatically created NSView subclasses, and mouse events
Re: Programmatically created NSView subclasses, and mouse events
- Subject: Re: Programmatically created NSView subclasses, and mouse events
- From: Kyle Sluder <email@hidden>
- Date: Fri, 18 Feb 2011 08:27:16 -0800
On Fri, Feb 18, 2011 at 7:54 AM, Howard Moon <email@hidden> wrote:
> You're quite correct. It works as it should now. The problem was that there was a single letter capitalized that shouldn't have been in one of my names, and only a warning was issued when compiling (which I promptly forgot about and didn't get back to). After fixing errors in other classes, recompiling skipped that one class because I didn't change anything there. That let the code compile, but meant that one of my classes (which I in turn tested the mouseUp/mouseDown code in) was NOT actually part of the hierarchy! (I found that by doing a Quick Model on the sources.)
>
> I fixed the problem, and now it behaves as I thought it should. My base class behavior works fine for those classes that don't want to change it, and the classes that do want custom behavior get it. (Ok, only one class changes it so far, but it works! :-))
>
> Lesson for the day: NEVER ignore the warnings, ESPECIALLY the "may not respond to" ones! :-)
Yes, always build with Warnings as Errors turned on. Also, build with
clang (aka "LLVM Compiler") rather than gcc if at all possible. clang
has much better warnings.
--Kyle Sluder
_______________________________________________
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