On Mon, Oct 10, 2011 at 1:19 AM, Albrecht Schlosser <[email protected]>wrote:
> DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK > BELOW. > > [STR New] > > Link: http://www.fltk.org/str.php?L2729 > Version: 1.3-current > > > Okay, I tested with and w/o the patch with the new attached spinner2.cxx > that has another button (label NOP) just to receive input focus when > pressing the TAB key, or to click on it to move the input focus from the > spinner input field to another widget. > > (1) TAB works as expected and triggers the callback w/o the patch, as well > as clicking on the button (FL_WHEN_RELEASE works as expected). > > (2) *With* the patch, each key press in the input field triggers the > callback (as expected with FL_WHEN_CHANGED), but this is /not/ the > *intended* behavior of this widget. > > Thus, this STR should be closed "w/o resolution". > > To Richard: if you /really/ need the behavior as changed by your patch, > then you should write your own widget, since we can't change it as > suggested in your patch. But maybe this was only a misunderstanding? > > Note that my test was on Windows, maybe you see different behavior on > another platform? Please comment on this, otherwise this STR will be > closed w/o resolution in a few days. > > > Link: http://www.fltk.org/str.php?L2729 > Version: 1.3-current > As Fl_Spinner stands our of the box. The callback gets executed every time that the value is changed via the up down buttons. To \not\ have the callback done when the value is changed via the keyboard is inconsistent behavior. Consistent behavior would be 1) Never call the callback on a value change. 2) Always call the callback on value change. Really consistent would be to have the callback for Fl_Spinner executed in accordance with the when() of Fl_Spinner and not the when() of the internal Fl_Input. And that is the real problem, my suggestion is a kludge that makes it appear uniform to the user. For a programmer to have to instruct the user to only change values of Fl_Spinner via the up/down buttons makes the programmer look like an idiot, the programmer following the trail looks at the library provider and says....... I presume the intended behavior of Fl_Spinner is to allow the programmer to specify the callback but have no control of the when(), as is the case currently.I do not want to appear nasty or ungrateful but Fl_Spinner seems to be more of a proof of concept rather than a finished item. Fl_Spinner has the same behavior in Windows and Linux. - Cheers Richard
_______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
