| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #2210
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | value() returns incorrect value during button press |
Version: | 2.0-current |
Created By: | parshin |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | parshin 19:55 Jun 27, 2009 |
| During draw() or callback, the pressed Button returns 0. The following code is a modified callback function from tests/Button.cxx. Upon pressing the button "Beep", it should change label to "1", and change it back to "0" upon release. In my tests, it just goes to "0". This is probably because pressing the button changes PUSHED flag, but value() returns STATE flag. This is also different from FLTK 1.x (value() works correctly there) and from FLTK 2.x documentation.
void beepcb(Widget *w, void *) { printf("\007"); fflush(stdout); Button* b = (Button*) w; if (b->value()) b->label("1"); else b->label("0"); } | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |