More generally, what is the difference between control classes and control cell classes? Buttons have the same hierarchy, for example - NSButton and NSButtonCell.
Looking at the documentation for NSTextField bindings and NSTextFieldCell bindings, they both have the same documentation for "value". Why do they both have a value? Can one exist without the other and still display a value?
An NSString or NSNumber that is displayed as the content of the NSTextField.
An NSString or NSNumber that is displayed as the content of the NSTextFieldCell.
So when I drag a text field or any other control into my UI, how do I determine which of the objects in the hierarchy to actually bind to?
There are much more complex controls in IB that create complex hierarchies in the document outline and as much as I've searched I haven't been able to find docs that explain which objects I should focus on and work with in terms of bindings and connections.
I'll settle for an answer to NSTextField/NSTextFieldCell but would really like to know how to discern the differences between all the things that make up a control and which I should focus on when developing my app.
Bind to the NSTextField. NSCells exist to help with drawing things on screen but are largely a relic of the past when giving everything its own view was considered a performance problem. Apple is gradually deprecating them. They expose a lot of the same interface but the NSTextfield will correctly delegate the right information to its cell if needed. You really only need to be changing the cell if you plan to override its appearance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With