Checkbox widget error with field is set as "list"

50 views
Skip to first unread message

Riz

unread,
May 4, 2020, 5:14:21 PM5/4/20
to TiddlyWiki
Just checking if I am the only one with this error

Steps to reproduce

Download an empty tiddlywiki
Create a new tiddler
Paste the following

<$checkbox field="list" checked="open" unchecked="closed" default="closed"> Is it open?</$checkbox>

Sincerely
Riz

Mark S.

unread,
May 4, 2020, 5:33:29 PM5/4/20
to TiddlyWiki
I don't get an error message, but the checkbox never binds to the field, and you can never flip the field away from "open".

The same thing happens if you use "tags".

Rizwan Ishak

unread,
May 4, 2020, 5:34:55 PM5/4/20
to TiddlyWiki
Yeah, same here

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/Q5zMj0hL4Jk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f87f793e-13c4-4781-a912-b1aeacb3fe29%40googlegroups.com.

Saq Imtiaz

unread,
May 4, 2020, 6:35:39 PM5/4/20
to TiddlyWiki
This is one of those weird quirks/bugs that we have since the list field gets special treatment and is always treated as a list of values, that is an array.
So "open" is the value we are setting, but ["open"] is what gets saved as the list field. Since they aren't the same, checkbox will never get rendered as checked.

Probably worth opening an issue for.

Also note that using the list field with a checkbox in this way will replace the previous contents of the list, it will not add to them, so using actions with listops operators is probably the way to go.

Tangentially related to https://github.com/Jermolene/TiddlyWiki5/pull/4567


On Monday, May 4, 2020 at 11:34:55 PM UTC+2, Riz wrote:
Yeah, same here

On Tue, 5 May 2020, 03:03 'Mark S.' via TiddlyWiki, <tiddl...@googlegroups.com> wrote:
I don't get an error message, but the checkbox never binds to the field, and you can never flip the field away from "open".

The same thing happens if you use "tags".

On Monday, May 4, 2020 at 2:14:21 PM UTC-7, Riz wrote:
Just checking if I am the only one with this error

Steps to reproduce

Download an empty tiddlywiki
Create a new tiddler
Paste the following

<$checkbox field="list" checked="open" unchecked="closed" default="closed"> Is it open?</$checkbox>

Sincerely
Riz

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/Q5zMj0hL4Jk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

TonyM

unread,
May 4, 2020, 9:53:05 PM5/4/20
to TiddlyWiki
With respect using a binary yes no that checkboxes create, on a field called list or tags already offends the naming gods. Reusing what I would call core fields for another purpose seems wrong as well.

With all due respect this is not a bug its a footnote.

If you must make use of core fields use them as designed.

Not withstanding my above comments I always thought it was sad that the core used such valuable field names such as type and list when they could have had a prefix e.g. tw-list but that's evolutionary design for you, we sometimes take hostages of our own future.

Somewhat in jest
Tony

Reply all
Reply to author
Forward
0 new messages