I want an NSComboBox in an NSToolbar. I do it via IB and Xcode 4.2. I can place the comboBox in the toolbar and start the program. The first time - and only the first time - the app starts, I get the following exception when I set the focus in the ComboBox:
Unlocking Focus on wrong view ((null)), expected NSComboBox
The next time I set the focus in the combobox, no exception is raised.
If I do the same with an NSTextField or a searchField, I do not get any exception. Since I do not remember to have had such issues in earlier version of Xcode/Objective-C, I'm wondering, if this is a bug.
Have you tried the following workaround yet?
Before dropping a NSComboBox in the toolbar try to drop an empty NSView on the toolbar. This should create a toolbar item with an empty view for you. Then drop the NSComboBox inside the NSView inside the toolbar item you just created.
I had similar issues and this worked for me.