PDA

View Full Version : Entering imperial values into NSTextField




cblackburn
Jun 25, 2007, 05:50 AM
Hey alll,

I'm developing a database app for a customer and he wants the program to be able to store the size of an object and be able to edit/view it in both metric and imperial. I was just wondering, before I go off the deep end and subclass NSTextField to do some funky imperial jazz, if there was a preformed class already out there in the wild?

Thanks

Chris



caveman_uk
Jun 25, 2007, 06:58 AM
I wrote a bunch of NSValueTransformers to do it for BeerAlchemy. The user can enter weights/volumes in a range of metric, UK Imperial and US Imperial units. Works best with bindings but you can use them outside of that mechanism if you want.

cblackburn
Jun 25, 2007, 07:00 AM
Hmm, interesting idea, I will be using Cocoa bindings so I'll look into this.

Thanks

Chris