• 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: XCode - The Missing Features
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode - The Missing Features


  • Subject: Re: XCode - The Missing Features
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 7 Jan 2009 01:03:54 -0800

On Jan 6, 2009, at 23:36, Nik Heger wrote:

I am wondering if there is a way to get the same functionality in XCode by just using it differently? XCode is pretty different and the other IDE I am used to is not exactly a shining example of great user interface design. It just has some features that are hard to live without.

Yes, there are several obvious things that aren't automated in Xcode or aren't very convenient.


1 - Automatic imports. I haven't written an import statement in years. The IDE usually takes care of that, and if an import would be ambiguous, it asks me. Does XCode have that, or does it not need it because you can .....?

No, it's not an Xcode feature. One difficulty would be that in Objective-C there's no syntax for declaring methods as private or protected, so it's not uncommon to use (informally) private or semi- private header files to keep things separated. Automatic imports would kind of be a bad idea in that case.


2 - Code complete for .h files - it seems a no-brainer to have this. I already have to define my methods in the .h file, and then proceed to implement in the .m file. I feel stupid typing the same text two times. Copy/paste is a bit quaint. Is there a way to get a definition and an implementation stub in the corresponding .m file either at the same time (define method wizard or something like that), or can code completion do that? It doesn't seem to work for me, e.g. I defined a method in the .h, then proceed to type the implementation in the .m file, and there are no offers of help from code completion. Same for implementing inherited protocols...

Copy/paste may feel old-fashioned, but it's not a lot of keystrokes. Note that if you paste (or drag) a method declaration from the .h file into the .m file, it's not necessary to delete the semicolon before adding the opening brace, if that helps any. But I agree it feels like duplicated effort however you do it.


Code autocompletion should work, but I think you might have to compile something that uses the .h file once before Xcode will do method autocompletion for the class.

3 - Automation for defining new properties. Here is what I have to do:
3-1: Define a new instance variable in the .h file
3-2: Declare it a @property(nonatomic, retain) in the .h file
3-3: @synthesize it in the .m file
3-4: release it in the dealloc method in the .m file (using for iPhone dev, sadly there is no gc there yet)
I find that a little repetitive. I feel dumb typing this in every time, and god forbid I forget a step. Can this be automated?

I only just noticed that the very-useful Refactor... function (right- click on a symbol) has an Encapsulate action that seems to generate a property from an instance variable. You could try that to see if it saves you some steps. Again, though, you might have to compile the class once before it will be usable.
_______________________________________________
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
References: 
 >XCode - The Missing Features (From: Nik Heger <email@hidden>)

  • Prev by Date: XCode - The Missing Features
  • Next by Date: Re: Static library confusion
  • Previous by thread: XCode - The Missing Features
  • Next by thread: Re: XCode - The Missing Features
  • Index(es):
    • Date
    • Thread