Re: NSKeyBinding suppressCapitalizedKeyWarning?
Re: NSKeyBinding suppressCapitalizedKeyWarning?
- Subject: Re: NSKeyBinding suppressCapitalizedKeyWarning?
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 31 Dec 2002 07:56:17 -0500
on 02-12-30 2:05 PM, Ryan Dingman at email@hidden wrote:
>
NSKeyBinding is a private class in Foundation. Instead, try calling:
>
>
[NSClassFromString(@"NSKeyBinding") suppressCapitalizedKeyWarning];
>
>
Hope this helps.
This does work. The run-time warning about using a capitalized method name
with key-value coding is suppressed.
However, it generates warnings at build time: "method not found" and method
return type "defaults to id". What a nuisance.
This run-time warning is condescending, paternalistic, insulting, and
gratuitous, too. The lower-case method name convention is well-documented
and well-understood, and it's only a convention. Why is it necessary to warn
me that I might have made a typographical error? In my situation, using
capitalized method names is essential because the names are coming from
another API over which I have no control. If this is just the
convention-police at work, they're falling down on the job, because there
are a whole lot of other conventions that should have similar warnings. And
why don't more warnings suggest I made a typographical error? -- "WARNING:
selector not found. Maybe you need to take a typing course." Phooey.
I've reported this to Radarweb and Emily Post.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.