[haiku-development] Re: RFC: B_INVALID flag for BControlLook

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 2 Oct 2014 13:23:59 -0400

On Thu, Oct 2, 2014 at 12:25 PM, looncraz <looncraz@xxxxxxxxxxx> wrote:
> Why doesn't BSpinner implement BControl rather than BView and BInvoker? I'm
> sure there must be a reason.

Good question, BControl returns an int32 for Value() and takes one for
SetValue(), I wanted to use a double instead. I originally did casting
to make this work but later decided the hack wasn't worth it and made
the control inherit from BView and BInvoker instead. This way I can
have SetValue() that take a double (or whatever I want thank you very
much) and I don't have to worry about overloading a method in the base
class.

Other related posts: