This fix make sure that the binding / connection is made to the CPTextField instead of the cell by replacing the cell with the text field when reading the xib file. The same mechanism is used in NSButton and NSMatrix.
This fix allows view based TableView bindings from a text field cell to the table cell view in the Interface Builder in Xcode.
Previously, the enabled/disabled control for NSTextField in Interface Builder was ignored by nib2cib.
This change allows the enabled/disabled state on CPTextField to be set in interface builder.
This is a second attempt to fix the problems addressed by 69bbe627a9.
Because table cell classes needed to use the same initialization code as the NS_initWithCoder methods, it was necessary to refactor the initialization code into separate NS_initWithCell methods and call them separately from NS_initWithCoder.
Previously, table view cells (non-view-based) were not being decoded with all of the available cell attributes in IB, and many attributes were hard-coded. In addition, there was a bunch of initialization code that has been made redundant by theming.
With this commit, decoding of all control classes has been refactored so that table view cells can use the same code, thus ensuring they decode all available cell attributes. In addition, the redundant code has been eliminated.
It is now possible to apply most table cell attributes such as font, color, alignment, sendsActionOnEndEditing, and so on, directly in IB.
Closes#1803
BREAKING CHANGE:
Changes have been made to table cell decoding in nib2cib. All xibs should be re-converted with `find . -name '*.xib' -exec nib2cib {} \;`.
Do not truncate bold labels.
So this is a temp fix as @aparajita has a better way to handle this. As the patch is very straightforward, it will be easy to revert it when a more correct fix will come up. But while waiting, I think it's a good idea to have correct displaying of the bold labels.
This interferes with Aparajita's auto-sizing of controls in initWithCoder:. Also it's better to calculate the size in initWithCoder: because the theme information is available.