Re: NSUserDefaultsController and enum values vs descriptions
Re: NSUserDefaultsController and enum values vs descriptions
- Subject: Re: NSUserDefaultsController and enum values vs descriptions
- From: "Stefan Arentz" <email@hidden>
- Date: Sat, 22 Sep 2007 15:28:26 +0200
On 9/22/07, Uli Kusterer <email@hidden> wrote:
> On 22.09.2007, at 12:51, Stefan Arentz wrote:
> > Ah yes NSValueTransformer, which does not work for NSTextFields so it
> > seems my only option there is an NSFormatter?
>
> I wouldn't subclass the NSTextField, though, I'd just write my own
> NSValueTransformer-like class. More reusable that way. Maybe you
> could even create an NSValueTransformer subclass and just extend it
> to work with NSTextFields. Might even be possible to just write a
> category that makes NSValueTransformer field-savvy. (Though I'm kinda
> surprised: Are you sure the value transformer doesn't work with
> NSTextField?)
No I assumed wrong. I wrote a 5 line NSValueTransformer subclass and
it works like a charm :-)
S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden