FLTK logo

STR #2901

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 | SVN ⇄ GIT ]

STR #2901

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 format codes
Version:1.4.0
Created By:corvid
Assigned To:matt
Fix Version:1.4.0
Fix Commit:bf9dfa2afdaa7a20d1152151519d3e34a1758a92
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#1 corvid
13:35 Dec 08, 2012
In the source, I saw an "N" to set to FL_INACTIVE_COLOR, but I don't see that listed in the documentation.


Hmm, I'm surprised that there's a case for format_char() followed by '@' specifically instead of format_char() followed by another format_char()...
 
 
#2 AlbrechtS
12:56 Dec 09, 2012
Thanks for the heads-up, and I agree with the points you make, but this would be much more useful if you told us *where* you saw this, so that we don't need to find it ourselves. ;-)
TIA
 
 
#3 corvid
13:06 Dec 09, 2012
Let's see...that formatting stuff was in...Fl_Browser::item_draw().  
 
#4 AlbrechtS
13:27 Dec 09, 2012
@1: 'N' format code undocumented: should be added to docs.

@2: literal '@': Hmm, I don't know what it's exactly intended to do, but the while loop started some lines above has "&& *str != format_char()", so this is in fact format_char() != '@' followed by '@' ?

Just wanted to add my *observation*, w/o further analysis. What is it intended to do there, and is that documented correctly? Or am I missing something?
 
 
#5 corvid
14:13 Dec 09, 2012
Ah, yes. So the literal '@' was to get out if you found your way in there for whatever reason and...wanted to get out and print the string starting with the '@'... I guess. The documentation under format_char() doesn't make that situation very clear.

In any case, I'm not using that feature. It was something that caught my eye while writing about "@N".
 
 
#6 AlbrechtS
14:55 Dec 09, 2012
The documentation is ... ambiguous at best:

http://www.fltk.org/doc-1.3/classFl__Browser.html#a6b4d3525d8d9fccfc748d824b39f250b

"'@@' Print rest of line starting with '@' "

Obviously the first '@' is meant to represent the current format_char(), but the second '@'? Literal '@' or also format_char()? I tend to read it as the latter, but ...

(a) then the code posted above in the while loop doesn't make sense

(b) how to represent a single @ sign and continue parsing format_char()? Is this not possible? At least I can't find it unambiguously in the docs. Or does "Print rest of line" mean "Print with parsing '@' signs (format_char()'s) ???

Still confused ... It's not clear to me whether the code is correct at all, whatever is documented or not.

Does anybody know what is really meant in the docs?
 
 
#7 matt
16:34 Dec 28, 2018
Both characters are supposed to be 'format_char()'. It's like '\\' resulting in a single backslash in C strings, or '%%' resulting in a single '%' in printf(). If the format_char() is set to a '$', for example, starting a line with an '@' needs no escape character. However, it would now be impossible to start a line with a '$', hence the '$$' escape sequence.  
 
#8 matt
17:22 Dec 28, 2018
This is fixed in 1.4.0. Do we backport these things to 1.3?  
 
#9 matt
17:22 Dec 28, 2018
https://github.com/fltk/fltk/pull/11  
 
#10 AlbrechtS
04:40 Dec 29, 2018
@Matt: Thanks for clarification and for fixing this.

> Do we backport these things to 1.3?

No, we backport only serious bug fixes (and macOS "Mojave" updates which fix serious bugs introduced by Apple).

PS: I added the Git commit # ("Fix Commit: ...")
 
 
#11 matt
16:36 Jan 14, 2023
Fixed in Git repository.  
     

Return to Bugs & Features ]

 
 

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