> 
> 
>> I'm just saying the stepper itself should not have a value, it should send 
>> actions to a controller so it can manipulate a numeric value in a model 
>> object, or it should be able (using bindings) to increment/decrement a 
>> model's value. Using the UI as a model isn't what MVC is all about.
> 
> 
> OK, so by that argument, no controls should have a value. Sliders should not 
> have a value. How then is that control going to draw itself? The position of 
> the slider is determined by its value relative to its min and max. If that 
> value can't be determined then the control will appear incorrectly, and 
> controls have no way to "ask" the data model for a value - it's up to the 
> relevant controller to push the value to the control.
> 
> Since all controls work that way, why should NSStepper be an exception?
> 
> In general I would agree that caching a value in more than one place is not 
> usually a good idea because of all the synchronisation issues that implies, 
> but for controls it's justified. In any case, correct use of controls, 
> whether through target/action or through bindings, takes care of the synch. 
> issue. If you are having trouble with that, you probably haven't got it set 
> up correctly. I use text field/stepper/slider combinations all over the place 
> and have never had to concern myself with synch. issues, even though all 
> three in a triple store the same value - get it right and really, it Just 
> Works.
> 
> You might as well get used to it, that's how it is.
> 
> --Graham
> 
I would simply say that NSStepper only knows about its own state. It is quite 
inline with MVC.
What the op is asking for is a more generic vertically oriented segmented 
button or a pair of NSButtons. That is super easy to implement. 
NSStepper is a precise type of form control for incrementing/decrementing a 
value. The value can be mapped to any sequential data. Dates and times are 
quite suited to it. Really anything that might have a reasonably narrow, 
precise granular increment. 
The only real question I see is whether the data incremented might also need a 
large scale ability to increment like a slider or nob or a combo box. 
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to