Joachim et al,
There is one minor (but annoying) detail about the combination of Objective-C completion and Bracket Matching. I have come to rely on Bracket Matching quite heavily, but that frequently leads to situations like this:
NSFileManager *fileManager=[NSFileManager defaultManager]; if(fileManager fileEx|
At this point completion (Alt-Esc) will not do anything because there is no opening bracket before 'fileManager'. So the only way is to type the closing bracket (which inserts the opening bracket), back-arrow, and then Alt-Esc, and later having to skip over the closing bracket.
Not really a big deal, and I suspect it would be difficult to implement, but in a perfect world I would hope code completion at the above situation would insert the brackets along with a snippet that lets me tab to any arguments and eventually past the closing bracket.
Gerd
On 15 Apr 2008, at 13:00, Gerd Knops wrote:
NSFileManager *fileManager=[NSFileManager defaultManager]; if(fileManager fileEx|
Personally I almost always type the closing bracket right after typing the receiver, i.e.
if(fileManager‸)
Press ] and you get:
if([fileManager ‸]
then you can continue to type the method name and completion will work fine.
On 15 Apr 2008, at 20:04, Ciarán Walsh wrote:
On 15 Apr 2008, at 13:00, Gerd Knops wrote:
NSFileManager *fileManager=[NSFileManager defaultManager]; if(fileManager fileEx|
Personally I almost always type the closing bracket right after typing the receiver, i.e.
if(fileManager‸) [...]
I think the problem is more apparent in a situation where you already have code like:
if([foo objectForKey:aKey])
And you basically want to add the Objective-C equivalent of: » == @"foo"«
if([foo objectForKey:aKey] isE‸)
Now you realize you’re not going to type out »isEqualToString:« but as this realization comes after having started to type, it is too late to use »]« directly after the method call.
Since we do have a db of all framework selectors, I have been thinking of maybe let »]« be smart and only leave the caret outside when the selector is known, but this would make it less predictable, especially since something partially typed might be a valid selector, just not the one the user had in mind, so he may not expect the caret to end outside.