View Single Post
Old 10-12-2021, 04:40 AM   #177
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,506
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Question:

I had this proof-of-concept template for making different icons based on is_marked values.

Code:
program:
m = is_marked();

first_non_empty
   (
    contains(m, "invalid_author_sort", 'test.png', ''),
    contains(m, "invalid_title_sort", 'test2.png', ''),
   )
But how do I set a value for a non-defined mark?
Do you mean no marks or not one of the ones you have tested for? If you mean no marks then
Code:
program:
m = is_marked();

first_non_empty
   (
    contains(m, "invalid_author_sort", 'test.png', ''),
    contains(m, "invalid_title_sort", 'test2.png', ''),
    if !m then 'foo.png' fi
   )
If you mean any mark other than the ones above then remove the !.
chaley is offline   Reply With Quote