• 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: A few IDE support questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A few IDE support questions


  • Subject: Re: A few IDE support questions
  • From: Jeff LaMarche <email@hidden>
  • Date: Thu, 17 Apr 2008 12:40:57 -0400


On Apr 17, 2008, at 11:38 AM, Rama Krishna wrote:
I have worked (and still do) intensively in Visual Studio/Eclipse/NetBeans. I have just started using XCode a month back and learning Mac/iPhone development and I love it. I have a few questions:
 
1.       Is there an IDE support for quickly implementing(adopting?) a protocol in a class? Is it possible to create method stubs for a protocol in a class interface and the implementation files automatically (without manual typing or copy paste)?
2.       Is there a quick way  to override a method (again without Copy/Paste)?
 
If XCode does not natively support these are there add-ins available to do these tasks?
 
Of course, they are not a big deal but if the IDE offers these productivity enhancements why not use them. Also what some cool and popular add-ins for XCode?

I guess I'm not sure what you mean by "a protocol in a class". You can define a protocol inside of a class header file, certainly, and then conform to that protocol and implement its methods in your class implementation. This is actually done quite a bit with dynamic method generation such as is used with Core Data - if you automatically generate model classes from Core Data entities, you'll see that it creates a protocol for the methods that go along with one-to-many associations. Other than code completion for known objects, however, I don't believe there is anything to automatically do this for you. But I think I'm not fully understanding what you want Xcode to do for you, because I'm having trouble picturing how the IDE would handle this task for you.

The second question I have is: are you sure a protocol is the correct way to do what you want to do. In many situations where a protocol would be used in other languages, a category is actually more appropriate in Objective-C, and I find that a lot of people who are new to the language tend to overuse protocols and underuse categories. If you need advice on that regard, the Cocoa-dev list would be a more appropriate place to ask.

As for #2, if you are overriding a method, the method autocomplete should recognize the method name from the superclass and save you some typing, but there is no key combination or other option AFAIK where you can specify "i want to override this method" and have it create the method stub for you.


Jeff
 _______________________________________________
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: A few IDE support questions
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >A few IDE support questions (From: "Rama Krishna" <email@hidden>)

  • Prev by Date: A few IDE support questions
  • Next by Date: Re: A few IDE support questions
  • Previous by thread: A few IDE support questions
  • Next by thread: Re: A few IDE support questions
  • Index(es):
    • Date
    • Thread