Re: Programming Style: Method Definition with or without a semicolon.

2009-10-19 Thread Dave Keck
Any suggestion how to jump from one method parameter prototype to the next to replace them one after the other? Eclipse does that with tab. If I understand you correctly, control-/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-19 Thread Alexander Spohr
Am 19.10.2009 um 08:05 schrieb Dave Keck: Any suggestion how to jump from one method parameter prototype to the next to replace them one after the other? Eclipse does that with tab. If I understand you correctly, control-/ Yep, that’s it! I didn’t see it in the prefs. Got it now. Thank

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-19 Thread Uli Kusterer
On 18.10.2009, at 04:35, Ken Thomases wrote: On Oct 17, 2009, at 2:24 AM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? For controlling code completion,

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-18 Thread Alexander Spohr
Am 18.10.2009 um 04:35 schrieb Ken Thomases: For controlling code completion, search for XCCodeSenseFormattingOptions on this page: http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html Thank you Ken,

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Uli Kusterer
On 16.10.2009, at 11:43, Graham Cox wrote: On 16/10/2009, at 7:12 PM, Uli Kusterer wrote: But you don't have to let Xcode frustrate you like this - you can define your own templates for all of the stubs it inserts. How? Where?!!! :-D

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Graham Cox
On 17/10/2009, at 6:24 PM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? I didn't say anything about code completion. I understood the OP to be talking

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Rob Keniger
On 17/10/2009, at 10:25 PM, Graham Cox wrote: If there is a way to disable these insertions independently and I've missed it, please someone, let me know how to do it. I can't recommend the ODCompletionDictionary plug-in for Xcode highly enough:

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Ken Thomases
On Oct 17, 2009, at 2:24 AM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? For controlling code completion, search for XCCodeSenseFormattingOptions on this

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Yandy Ramirez
Thanks a million for this, awesome! -- yandy On Oct 17, 2009, at 10:01 PM, Rob Keniger wrote: On 17/10/2009, at 10:25 PM, Graham Cox wrote: If there is a way to disable these insertions independently and I've missed it, please someone, let me know how to do it. I can't recommend

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Scott Anguish
I used the semi-colon until Ali at Apple said that we don’t do it that way. So I no longer do it that way. Personal preference only. On Oct 15, 2009, at 8:54 PM, Frederick C. Lee wrote: 1) I've seen an alternative way of defining a method, with the semicolon after the declaration, before

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Kyle Sluder
On Fri, Oct 16, 2009 at 12:01 AM, Scott Anguish sc...@cocoadoc.com wrote: I used the semi-colon until Ali at Apple said that we don’t do it that way. Heh, I didn't use the semi-colon until Tim at Omni said we do it that way. :-P The triple-clickiness is a very nice convenience (especially when

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Sander Stoks
Hello, If it's a feature, then it's definitely a new one since the original specification of Objective-C. It turned out to be surprisingly hard to find that specification, but I found a grammar description here:

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Bill Bumgarner
On Oct 16, 2009, at 12:17 AM, Sander Stoks wrote: If it's a feature, then it's definitely a new one since the original specification of Objective-C. It turned out to be surprisingly hard to find that specification, but I found a grammar description

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Uli Kusterer
On 16.10.2009, at 03:35, Graham Cox wrote: On 16/10/2009, at 12:30 PM, Roland King wrote: I'm ploughing it with you, I hate it too and spend 30 seconds every time I let XCode stub out a function for me moving the brace onto the correct line,

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Graham Cox
On 16/10/2009, at 7:12 PM, Uli Kusterer wrote: But you don't have to let Xcode frustrate you like this - you can define your own templates for all of the stubs it inserts. How? Where?!!! :-D http://arstechnica.com/apple/guides/2009/04/cocoa-dev-design-your-own-xcode-project-templates.ars

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Sander Stoks
Woah, I'm sorry everybody... only when I saw my post in the list I realized that my copy-paste from Safari contained spacer GIFs. Here's the story again. --- If it's a feature, then it's definitely a new one since the original specification of Objective-C. It turned out to be

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread Andy Lee
On Oct 16, 2009, at 3:55 AM, Bill Bumgarner wrote: I haven't booted my NS 0.8 cube in about a decade, but I'm pretty sure the semi-colon was always required in the header file and always allowed in the @implementation. 'Twas many a moon ago, but, I do distinctly remember triple-clicking

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-16 Thread glenn andreas
On Oct 16, 2009, at 2:55 AM, Bill Bumgarner wrote: On Oct 16, 2009, at 12:17 AM, Sander Stoks wrote: If it's a feature, then it's definitely a new one since the original specification of Objective-C. It turned out to be surprisingly hard to find that specification, but I found a grammar

Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Frederick C. Lee
1) I've seen an alternative way of defining a method, with the semicolon after the declaration, before the body: - (NSArray *)sortedIncredients; -- notice the semicolon { ... } 2) ... versus the standard declaration + body of the definition (without the semicolon): -

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Nick Zitzmann
On Oct 15, 2009, at 6:54 PM, Frederick C. Lee wrote: Is there any benefit of (1) over (2) or is it merely style of programming? IMHO (1) should not be allowed, because you can't write C functions that way (the compiler throws a parsing error if you do that), so it's odd that you can

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Graham Cox
On 16/10/2009, at 11:54 AM, Frederick C. Lee wrote: Both seem to work the same. Is there any benefit of (1) over (2) or is it merely style of programming? (1) isn't really an alternative way of implementing a method, it's just that the trailing semicolon is ignored. I'm not even sure if

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Roland King
Graham Cox wrote: On 16/10/2009, at 11:54 AM, Frederick C. Lee wrote: Both seem to work the same. Is there any benefit of (1) over (2) or is it merely style of programming? (1) isn't really an alternative way of implementing a method, it's just that the trailing semicolon is ignored.

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Graham Cox
On 16/10/2009, at 12:30 PM, Roland King wrote: I'm ploughing it with you, I hate it too and spend 30 seconds every time I let XCode stub out a function for me moving the brace onto the correct line, andputtingspacesbackbetweenparanetheses,bracketsandarguments so I have a hope in hell of

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Dave Keck
Agree 2000%! Same here. A side note: in (Objective-)C you can also type jibberish after the trailing quote of an #include and it gets ignored (at least with GCC, not sure about Clang.) Not as useful as the semicolon bug, but I think it helps illuminate just because you can, doesn't mean you

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Robert Tillyard
I keep meaning to file an enhancement request for the space before ()'s, I have to go back and manually change every occurrence and then add spaces after the commas in the function arguments. I also prefer - (void)foo { } over - (void)foo { } Regards, Rob. On 16 Oct 2009, at 02:30,

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Symadept
Hi Rols, The same happened to me once. Accidently part of copy paste from header to .m, it happened that structure. But why Objective C compiler won't give any error for this. Really frustrating. Regards Mustafa On Fri, Oct 16, 2009 at 10:32 AM, Robert Tillyard r...@atvetsystems.comwrote: I

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Marc Respass
Ric 1) I've seen an alternative way of defining a method, with the semicolon after the declaration, before the body: - (NSArray *)sortedIncredients; -- notice the semicolon { ... } 2) ... versus the standard declaration + body of the definition (without the semicolon):