Well I've been spending the past few days furiously trying to learn something new. Took me a long time to decide on 'what', but I've settled on the following idea:
• Moving my custom controls to Interface Builder, so I can drag and drop them into new apps, set all their properties, and use them like never before - all without having to write a line of code.
Why did I pick this? It allows me to learn something new, yet not have to stray out of my own code. Less headache! Play in my sandbox! Yay!
Fortunately, IB3 in Leopard makes this really easy, once you have a good grasp of Cocoa coding. I went back to my flagship demo app, the Flare browser, and chose the UI elements I wanted to rip out and make reusable:
- The Tab View - arguably my prettiest custom control
- The Zoom Slider - complete with floating value indicator
- The URL Field - essentially a clone of Safari's address field. Icon+text, doubles as progress bar.
A bit of mucking around later, and a bit of learning about NSCoder (for archiving class values to a nib), I had a working version! I went ahead and refactored everything to make it clearer too. I dub thee Flare Kit!
So now, with my palette, I can create the following UI without writing a single line of code! This will make a lot of things easier in the future, and I can continue to work on my palette and make its classes rock solid and usable anywhere. Who knows, maybe someday there'll be a public or source release =o) Thanks go to Len Case as usual, for helping me out and talking me through ideas.