STR #1501

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 ]

STR #1501

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_Browser_: Never say "never".
Version:1.1-current
Created By:wilson.afn
Assigned To:matt
Fix Version:1.1-current (SVN: v5639)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size top right image
 
#1 wilson.afn
20:23 Nov 17, 2006
foo.fl
1k
 
bottom left image   bottom right image

Trouble Report Comments:


Name/Time/Date Text top right image
 
#1 wilson.afn
20:23 Nov 17, 2006
FC5, GCC 4.1.1 (although I'm not sure it matters).

I'm trying to subclass an Fl_Browser_ using a fluid-built dialog.  I want to set a callback, but "o->when(FL_WHEN_NEVER);" it and "this->do_callback();" at a more appropriate time.

Strangely, when I inform fluid of my intention, it generates "o->when(2);" instead of the expected "o->when(0);"  It doesn't seem to matter, though.  If I manually insert the latter in "extra code", the callback is still called.  Does "never" mean "only occasionally"?

Frankly, I'm not even sure this is a bug.  It may be a documentation problem.  Fl_Browser_ does a lot, and I imagine it's entitled to use callbacks if it wants.

I've attached a fluid spec that illustrates the problem.  Use the cursor keys to change the selection in the 3-item browser.
 
 
#2 matt
08:17 Jan 24, 2007
The first mistery is solved: Fluid puts "2" into the "when" field if you have "not changed" switched on. This is a bug that'll be easy to fix.

The second one is probably just an oversight when calling "select". I will look into it.
 
 
#3 matt
12:35 Jan 24, 2007
Fixed in Subversion repository.

If ixed Fluid to not output illegal bit combinations in "when, particularly the combinations of "never" and "always", which non-surprisingly leads to misunderstandings in the code later.

The better solution though would be to make it impossible to enter such combinations to begin with.

I also fixed Fl_Browser_ which would unconditionally call the callback on keyboard events, even if "when" was set to "never".
 
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.