Bindings rule!
• Chris Liscio
• Chris Liscio
In doing some of my UI work this weekend, I couldn't help noticing a new panel in the Interface Builder palette that had three green cubes in it. I did some digging in the documentation and found Cocoa Bindings. Oh my goodness is that ever a godsend!</p><p>I used to be pretty annoyed by writing a whole bunch of set/get routines for any parameters I wanted to be set by a UI, not to mention a specific Controller object to handle the work of getting UI messages to the "business logic" object. Sure enough, Cocoa Bindings lets me take the UI messages through a generic NSObjectController (which you can rename – handy, indeed!), and saves me a whack of time I would have normally spent writing lots of repetitive code.</p><p>I've read about three different articles and examples on the topic, and I think I'm good to actually use what I've learned in the final product. Yay!</p><p>One problem, though – requires OS X 10.3 and above. I don't see that as a big hurdle for the final product, nor do I think it will cost me a lot of sales. Since Panther's been out for almost a year now, and Tiger's on its way, I'm sure that when I'm done that most people will be using Panther.</p><p>We'll see, though.</p><p></p>