Re: Newbie questions about XCode
Re: Newbie questions about XCode
- Subject: Re: Newbie questions about XCode
- From: Johan Lund <email@hidden>
- Date: Wed, 3 Feb 2010 14:00:59 +0100
First of all, thanks everybody for taking the time to answer. Now to my comments and some debating. :)
> Go to Preferences > Indentation and choose Automatically insert closing "}"
This should be checked by default do doubt.
>> Why does the completion not know about variables declared in the .h file?
>> Oh, it does, just found out... But only if you have saved your .h file, which brings me to my next question.
>>
>> This, having to save all the time is highly annoying. Especially when you add an outlet and switch into interface builder and its not there. Is there a way to automatically save the document everytime I switch between counterparts or into xcode or before compiling etc. In IntelliJ IDEA there is no need to save - ever! If you need to go back on something dangerous you just pull up local history, and in addition to that you have VCN.
>
> For compiling, try going to Preferences, Building and set "For Unsaved Files:" to "Always Save".
This only works when building. It does get rid of the annoying "save all" dialog which is good. But the problems with unsaved header files and switching to interface builder remains.
This stuff really trips up new users and bare in mind that the newcomers are less likely to log bug reports and feature requests for XCode and the old timers are have become used/numb to it.
So I hope the Apple XCode team doesn't just consider the most voted for topic in their bug tracker.
>> Why do I sometimes get two tabs instead of one? I find that I quite often have to press backspace on a new line because XCode inserted two tabs instead of one.
>>
>
> Is it trying to automatically do indenting?
Yes it's trying. I managed to figure out why it does this. Bug or feature, thats the question?
This is the situation where it always happens.
1. write a new method signature in a .m file
2. type the open brace and press return - (it inserts one tab for me and places the cursor at the correct pos but) it didn't close it for me so I...
3. Press return again and type in a closing brace
4. press the up arrow (it's now at column 0)
5. press tab (it inserts another tab in addition to the one that was already there and places the cursor two tabs from the start of the line)
With the option to automatically insert closing brace the problem is circumvented (in this situation at least).
> Why does not camelcase completion work? e.g. typeing “UIPV” should cause UIPickerView to be suggested.
> as far as I know because it doesn't, I've never even thought about that feature before, I type uip and then <esc> and go pick from the list, by the time you typed uipi you're pretty much there. Perhaps you're used
> to thinking in camelCase, I never really have.
It is a common feature now days in many editors and one that I have become used to. It is superior when the list that you call up with ESC is long. But also better in many other situations where there are many classes that begins with the same characters and starts differing in the end. And unfortunately XCode isn't being very clever about it. If you have the following methods
myAssert1
myAssert2
myAssert3
myAssert4
myHelloWorld
... and let's say that goes on for quite a bit more so its not convenient to choose it from the list.
Then you are forced type the whole name! Even if have typed "MyA" - XCode doesn't fill in the rest up to "myAssert".
I hope i got this right now... :)
>> Is there a way to add a newline after the one I am currently positioned in the middle of?
>
> Very often it's better to have fewer features so people don't get overwhelmed with featuritis. This is such a case, you can achieve the same with just a few strokes of the arrow keys (key down, key left).
I disagree. To reduce usability complexity by not implementing time saving features is the wrong approach completely. Instead, complex applications should should adopt a layered approach where necessary functionality is present at first but advanced users can progressively tap into more functionality at their own will.
This was just an example, other such features I use a lot is duplicate line, move line, delete line, auto indent line. All these features, once learned, are saving me hundreds of keystrokes every day and reduce "mental friction".
> Is there really no intelligent code generation built in?
>
> The whole idea of the Cocoa-like ecosystem is to make code generation obsolete. If code can be generated automatically, why put it there at all?
That sounds like a great motto. But we're not quite there yet are we...
Ok, I'm new at this but for example; I find myself copying method signatures right and left!
When adding and outlet to a class I find myself adding a property declaration and then synthesizing it. This could all be done for me.
Things like this is done for me if I want it to in IntelliJ for example, the call it intentions. "It seems like you intend to implement an adapter in this class..."
Let's say I add an interface to a class in IntelliJ. The editor will ask me if I want it to automatically generate the method signatures that I have to implement.
If it's not an interface but an adapter it displays a list of possible methods to override that I can then pick and choose from. The same could be done for Delegates and DataSources in XCode.
I can see XCode already have some intelligence like this when coding for example a switch statement. Why not expand on it...?
_______________________________________________
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