Re: misspelled methods
Re: misspelled methods
- Subject: Re: misspelled methods
- From: "Sean McBride" <email@hidden>
- Date: Tue, 18 Aug 2009 10:48:59 -0400
- Organization: Rogue Research Inc.
On 8/17/09 8:00 PM, Todd Heberlein said:
>I just spent about an hour trying to track down a bug. It turns out
>that instead of typing
>
> - (void)viewDidLoad
>
>I typed
>
> - (void)viewDidload
>
>with a lower case 'L' in "load".
>
>It reminds me of programming languages where if you mistype a variable
>name the compiler just happily assumes you want a new variable and
>creates one for you. I hate those languages.
>
>Is there any way for me to get Xcode to complain when it runs into a
>method implementation that was not previously declared in a header file?
I don't think so. I'd suggest against that anyway, because it means you
would be polluting your public .h file with private method
declarations. Besides, you'd probably just copy-paste your typo anyway.
However, gcc can warn if you send an unknown message to an object. Take
a look at: -Wstrict-selector-match -Wundeclared-selector
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden