• 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: Was: Re: NSStepper - useless?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Was: Re: NSStepper - useless?


  • Subject: Re: Was: Re: NSStepper - useless?
  • From: William Squires <email@hidden>
  • Date: Sun, 26 Feb 2012 18:44:34 -0600

On Feb 23, 2012, at 2:13 PM, Seth Willits wrote:

> On Feb 23, 2012, at 6:16 AM, William Squires wrote:
>
>> From what I've read, the NSStepper has a bug (though practically, you'll never see it); if one were to click the up or down arrow on the control 2^32 times (assuming it's value is a 4-byte signed int,and is initialized to 0), it would wrap around (or raise an exception for integer overflow). Probably not what the user had in mind!
>
> It's pretty irrelevant, because you wouldn't be using a stepper control for values in the billions. That'd be a poor UI. Just like if a table view had a couple billion rows in it in (in 32-bit) it would have broken as well. But it's a terrible thing to do in the first place. ;)
>
>
>> Why didn't they just make the NSStepper a custom view that draws two arrows, and has two sent actions that you can connect? Or even a variation of NSMatrix with two button cells that look like arrows. That would avoid the problem entirely, and be more intuitive to use.
>
> Not really. The control's intended use is to increment and decrement a value. That's what it does. If you're not using the stepper for manipulating a numeric value, you should probably be using a different control.
>
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.

>
> --
> Seth Willits
>
>
> _______________________________________________
>
> 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


_______________________________________________

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: Was: Re: NSStepper - useless?
      • From: Seth Willits <email@hidden>
    • Re: Was: Re: NSStepper - useless?
      • From: Graham Cox <email@hidden>
References: 
 >Was: Re: NSStepper - useless? (From: William Squires <email@hidden>)
 >Re: Was: Re: NSStepper - useless? (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: xCode crash on validation for App Store
  • Next by Date: Re: Was: Re: NSStepper - useless?
  • Previous by thread: Re: Was: Re: NSStepper - useless?
  • Next by thread: Re: Was: Re: NSStepper - useless?
  • Index(es):
    • Date
    • Thread