• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSUserDefaultsController and enum values vs descriptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSUserDefaultsController and enum values vs descriptions


  • Subject: NSUserDefaultsController and enum values vs descriptions
  • From: "Stefan Arentz" <email@hidden>
  • Date: Sat, 22 Sep 2007 12:04:20 +0200

I have hooked up a slider with a range of 1-5 to the
NSUserDefaultsController. I see the value appear in the preferences
file and I also see the numeric value appear in a  (non editable)
NSTextField that I bound to the same value.

So this works great but I don't want to show the numeric value of the
slider in the text field. Instead I want to translate it to a
description. Is there a way to transform the value when it is pushed
out to the text field? Or do I have to subclass the textfield and
override it's setIntValue: method?

What is the Cocoa way to do this?

 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

  • Follow-Ups:
    • Re: NSUserDefaultsController and enum values vs descriptions
      • From: "Stefan Arentz" <email@hidden>
  • Prev by Date: Distributed Object, session behaviour problem
  • Next by Date: Re: NSUserDefaultsController and enum values vs descriptions
  • Previous by thread: Distributed Object, session behaviour problem
  • Next by thread: Re: NSUserDefaultsController and enum values vs descriptions
  • Index(es):
    • Date
    • Thread