Hi there,
I have problems with the "reformate method call" of the Objective-C bundle. I don't know if I don't understand the function or if it is a bug - hope you can help me :)
Code snippet: [nc removeObserver:self]; NSLog(@"%s: Unregistered with notification center: %@", _cmd, [self fileName] ); [super dealloc];
The NSLog line is longer than my wrap-settings. So I want to reformat that line to have the log command splitted over two lines, possibly with an intendation for the second line. But if I press ^q the code ends up like this:
[NSNotificationCenter defaultCenter]; [nc removeObserver:self]; NSLog (@"%s: Unregistered with notification center: %@", _cmd, [self fileName] ); [super dealloc]; } @end
Do I use the wrong command? Is it a bug?
Thanks for reading ;) Simon
Hi there,
I have problems with the "reformate method call" of the Objective-C bundle. I don't know if I don't understand the function or if it is a bug - hope you can help me :)
reformat method calls, is used to reformat multiple part method calls. It's explained in more detail in the Help file...
4.1 Method Calls
Pressing ⌃Q when the caret is inside a multi-part method call will align the method-parts around the colon (:). For example the following:
[NSEvent enterExitEventWithType:anEventType location:aPoint modifierFlags:flags timestamp:aTimeInterval windowNumber:number context:aGraphicsContext eventNumber:x trackingNumber:tracker userData:data] Will be reformatted as:
[NSEvent enterExitEventWithType:anEventType location:aPoint modifierFlags:flags timestamp:aTimeInterval windowNumber:number context:aGraphicsContext eventNumber:x trackingNumber:tracker userData:data] By default the inner brackets will be reformatted if the brackets are nested, move the caret to a non nested area to get the outer methods reformatted.
Hope that clears things up.
Joachim Mårtensson