2008 03 25Bindings via KVC only
After reading NSObject's Default Bind Implementation, I tried it out and it works just great ! You can bind any property of your custom class as long as your class is KVC compliant for that property. In Leopard, that means you can bind your properties out of the box.
// Define a class with two properties @interface MyCustomNSView : NSView { float x, y; } @property float x, y; @end // Synthesize accessors @implementation MyClass @synthesize x, y; @end
That's it ! Beautiful.
Cocoa Bindings
- WebViewControl Sample code for custom bindings : binding Cocoa to an html page
- Establishing manual Cocoa Bindings Bindings in a custom NSView
- Custom cocoa bindings What I'd like to see in IB to setup custom bindings
- Bindings via KVC only In Leopard, your properties are bindable without any extra work
- Bindings, Outlets, Target+Action across multiple NIBs