View Single Post
Old 02-06-2023, 02:44 PM   #18
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,501
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Wiggo View Post
Code:
program:
[...]
	if $$#annots then icon = add_icon(icon, 'annotations.png') fi;
[...]
Don't use raw_field() when testing for an empty string. With raw_field(), if the value isn't defined you get 'NONE' instead of ''.

Use either:
Code:
#normal field()
	if $#annots then icon = add_icon(icon, 'annotations.png') fi;
or
Code:
# raw_field()
	if $$#annots != 'NONE' then icon = add_icon(icon, 'annotations.png') fi;
chaley is offline   Reply With Quote