• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: misspelled methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: misspelled methods
      • From: Hamish Allan <email@hidden>
References: 
 >misspelled methods (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Re: how do you go back
  • Next by Date: Re: Newbie thread question
  • Previous by thread: misspelled methods
  • Next by thread: Re: misspelled methods
  • Index(es):
    • Date
    • Thread