Development

Focus follows selection and Xcode 4

Posted in Development on July 28th, 2011 by Joachim – 1 Comment

Finally Xcode 4 is here and the days of Version 3 are almost part of history.

There was one nifty feature that I liked very much in Xcode 3. It’s “Focus follows selection”. This feature was supposed to be in Version 4, since it can be found in the “Editor Menu” of Xcode 4, but oddly it’s always disabled. Even in Xcode 4.1 and 4.2 (beta).

So far for the bad news, but now for the good news: This feature is still available and functional in all Versions of Xcode 4. But you just can’t use the Menu to activate it. You have to open “Terminal” to do so. At the command prompt type the following:
defaults write com.apple.dt.Xcode DVTTextCodeFocusFollowsSelection -bool yes

Before you do so, make sure Xcode 4 is not running, because the setting may be overwritten when Xcode quits. After restarting Xcode “Focus follows selection” should work until you disable it with following command:
defaults write com.apple.dt.Xcode DVTTextCodeFocusFollowsSelection -bool no

With “Focus follows selection” enabled you can now fully concentrate on the block of code you’re working on – Even with Xcode 4!

Cocoa Animation Proxy “woes”

Posted in Development on February 16th, 2010 by Joachim – Be the first to comment

Both, NSWindow and NSView offer a convenient way to add animation to your UI by the use of animation proxies. But there are some “woes” you have to keep in mind.
read more »

+ (void)initialize called only once?

Posted in Development on February 15th, 2010 by Joachim – Be the first to comment

To make a long story short: The answer is no!

Even if you don’t subclass, there are side effects you’d never thought possible.
read more »