[haiku-development] Re: BSlider not sending message

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 19 Mar 2010 10:17:35 +0100

On 2010-03-19 at 09:27:16 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Matt <laceysnr@xxxxxxxxxxxxxx> wrote:
> > I'm having an issue with some BSliders and I'm not sure if it's a bug
> > in Haiku but I can't see why it'd be caused by my code. I've written
> > a
> > quick boids screensaver which is up on haikuware.com and recently
> > added some controls. However when the preferences panel is first
> > displayed if you grab a slider and slide it all the way to the left
> > it
> > doesn't seem to send a message to say it's been modified. Setting it
> > to any other position works fine, and once it's been moved once it
> > will always work even at the far left... very confusing! Had a quick
> > look at some code inside BSlider but couldn't see anything obvious.
> 
> Can you strip down your interface code to a short example like in
> src/tests/kits/interface/SliderTest.cpp (or adapt that one), and tell
> how one can reproduce it?
> I don't understand the difference between "grab a slider and slide it
> to the left" and "setting it to any other position works fine" - you
> mean setting without sliding?

I think he means sliding it all the way to the left. It sounds to me like 
an internal state is not updated. Like when you create the BSlider, it will 
have a value of 0, and then programatically setting another value will 
somewhere not cause an adjustment, and when you drag all the way to the 
left, it thinks nothing changed and doesn't fire. From there on, everything 
seems to be in sync. Something like that...

Best regards,
-Stephan

Other related posts: