| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3480
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Missing method(s) in Fl_Check_Browser |
Version: | 1.3.4 |
Created By: | njord |
Assigned To: | AlbrechtS |
Fix Version: | 1.4.0 |
Fix Commit: | e06c09fa2595d5e4450f5898bed69ef312536386 |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | njord 13:50 Jul 20, 2018 |
| Fl_Browser_::sort uses methods like item_text(void*) which in Fl_Browser_ returns 0 and it's not implemented in Fl_Check_Browser. | |
|
#2 | AlbrechtS 08:37 Aug 01, 2018 |
| Thanks for the report. These methods are indeed not defined.
Please try attached patch (Fl_Check_Browser_H.diff) and report if this fixes the issue for you.
See also uploaded demo program check_browser_1-3.cxx that can be used to test sorting and swapping of pairs of browser lines. Note that the test program can only be compiled after applying the patch mentioned above.
This patch is a proof of concept. It is implemented as a header-only patch, but you must still compile the entire library because it breaks the ABI.
The final solution will appear in FLTK 1.4.0 though since this patch breaks the ABI and FLTK 1.3.x development is closed anyway. However you can use the attached patch if you want to compile FLTK 1.3.x for your own use.
Option: if it works for you we can *consider* adding the patch as an ABI feature in fltk 1.3.5. No guarantees though. | |
|
#3 | AlbrechtS 08:44 Aug 01, 2018 |
| Additional note: if you want to download the entire patched library you can use this link: https://github.com/fltk/fltk-test/tree/str-3480_Fl_Check_Browser_1.3
Then, use the "Clone or Download" button to clone the Git repository or download a Zip file.
IMPORTANT NOTE: This link is EXPERIMENTAL, it's just available for testing for a limited time. It is functional as of Aug 1, 2018 and maybe some more days or weeks, but the underlying test git repository *will* be deleted sooner or later. | |
|
#4 | AlbrechtS 08:47 Aug 01, 2018 |
| ... if you 'clone' the git repository mentioned above, don't forget to
$ git checkout str-3480_Fl_Check_Browser_1.3 | |
|
#5 | njord 03:13 Aug 02, 2018 |
| It works, but it is missing a redraw after sort. The other browsers are automatically redrawed. | |
|
#6 | AlbrechtS 03:21 Aug 02, 2018 |
| Thanks for your comment. I'll look into the redraw issue.
FWIW: ISTR that I noticed that it was necessary and I added a redraw() call to the demo program. If the other browsers do it in or after sort(), then we should probably do it in Fl_Check_Browser as well. | |
|
#7 | matt 07:29 Feb 02, 2019 |
| I took the liberty to apply the patch in the header and move the code into the source file. | |
[ Return to Bugs & Features ]
|
| |