• 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
Re: SliderText = NSSlider + NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SliderText = NSSlider + NSTextField


  • Subject: Re: SliderText = NSSlider + NSTextField
  • From: Thomas Engelmeier <email@hidden>
  • Date: Thu, 31 Jan 2008 09:49:05 +0100


On 31.01.2008, at 00:47, John Richetta wrote:

If I could create a proper control, that supported all the usual control behavior, I'd much prefer that, but I'm not keen on implementing any significant control or cell subclass, unless it can be done quite cleanly (without messing up control/cell interaction, and preferably without a lot of code). I don't see an easy way to subclass NSControl, given the need to support a "cell" for the paired controls.

I'm in a similar position. I need sliders with labels for the min / max value, and quite some of them. Amazing, a modern DSLR camera has 60..100 custom settings. Later I probably also need an optional textual readout. Looking at the documentation it seems a custom NSSliderCell is the way to go. Unfortunately, it seems that the methods to set a custom cell are deprecated in Leopard, but I didn't find out WHY it is deprecated and what should be used instead..


For your task, the two control values are not really synced.. They are separate and get synced at defined points:

- as soon as the associated text field looses focus, retrieve and validate the value.
- if the value is out of bounds, either clip the it or reset to the slider value


- if the slider gets moved, update the text value.

Regards,
	Tom_E
_______________________________________________

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


References: 
 >SliderText = NSSlider + NSTextField (From: John Richetta <email@hidden>)

  • Prev by Date: Re: programming in C++ ?
  • Next by Date: Login item support for Panther, Tiger and Leopard
  • Previous by thread: Re: SliderText = NSSlider + NSTextField
  • Next by thread: Re: SliderText = NSSlider + NSTextField
  • Index(es):
    • Date
    • Thread