• 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: Paul Summermatter <email@hidden>
  • Date: Tue, 18 Aug 2009 11:29:58 -0400

Allan,

Coming from Java, this is one of many big gripes that I have with Objective-C and the whole development environment. As you may or may not be aware, Java has an @Override annotation which makes it much harder to make these kinds of typos when overriding parent methods. As for those who say you have to remember to mark the method with an annotation, most of the good Java IDEs will warn you if you do not and will actually insert the annotation automatically if you use one of their autogenerate methods commands where you say you want to override a method. This then also future protects you if someone changes the name of the parent method without doing a proper refactor, because the compiler will fail until you rename the implementations in the subclasses. Objective-C and Xcode would do well to implement such a set of features. And yes, I will go file a request in Radar now :-).

Paul

On Aug 18, 2009, at 10:58 AM, Hamish Allan wrote:

On Tue, Aug 18, 2009 at 3:48 PM, Sean McBride<sean@rogue- research.com> wrote:

On 8/17/09 8:00 PM, Todd Heberlein said:

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.

What might be more useful is a warning if a method selector differs from that of an ancestor class only by capitalization (or perhaps also by trailing colon, to help catch viewWillAppear versus viewWillAppear: typos).

Hamish
_______________________________________________
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

_______________________________________________ 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>)
 >Re: misspelled methods (From: "Sean McBride" <email@hidden>)
 >Re: misspelled methods (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: misspelled methods
  • Next by Date: Re: Interpreting Shark Results
  • Previous by thread: Re: misspelled methods
  • Next by thread: Re: misspelled methods
  • Index(es):
    • Date
    • Thread