Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Should I use Xcode or Eclipse?

  • Xcode.

    Votes: 0 0.0%
  • Eclipse.

    Votes: 3 100.0%

  • Total voters
    3
  • Poll closed .

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,561
6,059
Are you saying you don't get code-completion suggestions for closing brackets ( ] ) or automatically inserted closing braces ( } ), if you have those options enabled? If not, you should be filing bug reports with Apple.

I find the auto-completion also works fine with things like:
Code:
@"string[COLOR="Gray"]"[/COLOR]

'x[COLOR="Gray"]'[/COLOR]

(x + y[COLOR="Gray"])[/COLOR]

Here's an example of where it craps itself:

Code:
outputString appendFormat:@"%@", object<cursor>

Have your cursor at the spot indicated in the line and press the ']' key. Where does your open brace go?

Code:
outputString appendFormat:@"%@", [object]

Yay! Invalid code helpfully generated by Xcode automatically inserting a retarded brace when it could have easily become valid code by putting the brace all the way at the start of the line. For extra fun, you can press ']' any number of times and it'll add open braces in that terribly unhelpful spot each and every time.

You're right, sometimes Xcode actually has helpful automatic inserts. In fact, it may be that Xcode is correct 90% of the time and I just don't appreciate it because of the fact that every time it's wrong, I have to go back and fix it, thus breaking whatever roll I was on and killing productivity. I can't say I ever have this kind of problem in any other IDE. Granted, it may just be on account of how lousy Obj-C's syntax is. Maybe I'm unjustly calling Xcode a crappy IDE when really it's just that Obj-C's syntax makes auto competition rather difficult. After all, maybe I wanted to call one of object's methods (and a method on that, and a method on that, and a method on that…). In most any other language, that would be indicated with a dot at the end and I wouldn't need anything placed at the front of the object's name. In non-O-O languages like Lisp… IDK, something about the fact the function name comes first just keeps me from having this kind of problem.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
Here's an example of where it craps itself:

Code:
outputString appendFormat:@"%@", object<cursor>

Have your cursor at the spot indicated in the line and press the ']' key. Where does your open brace go?

Ah, sorry. Didn't realize you also wanted auto-begin. :)

Yeah, if you're not going to start method calls with an opening bracket (I don't know why you wouldn't), then Xcode is not much help in filling things in for you.
 
Last edited:

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,561
6,059
Ah, sorry. Didn't realize you also wanted auto-begin. :)

Yeah, if you're not going to start method calls with an opening bracket (I don't know why you wouldn't), the Xcode is not much help in filling things in for you.

The problem is that often I'm not sure if I'm going to use a property, method, or the object itself when I type in the name of an object. Do I want to use the object or property directly, or is there a transformation I'll want to make first?

In the case above, I wasn't sure whether I was going to use the string itself or modify it before using it.
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
The Official IDE for Android Development is Android Studio. Google made it.

It's still pre-beta. How usable is the pre-beta for actually creating working Android apps on a Mac.

I tried to use xcode for cross-platform development (linux) some time ago and found that is was intended only for writing software targeted for OSX or iOS and did not play well with others.

I alternately use Xcode and/or vi to edit my linix source code and makefiles, then make from the command-line.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.