checklist in sidebar

175 views
Skip to first unread message

Adam S.

unread,
Jul 14, 2019, 5:01:05 PM7/14/19
to tiddl...@googlegroups.com
Hi all!
When I try to use this plugin in the SideBar, it gives me a javascript error.
I'm no good with javascript, can anyone tell me what causes this and if it is fixable? (and perhaps how to fix it)
TypeError: $tw.wiki.getTiddler(...) is undefined

Mohammad's great new todolist plugin works in the sidebar, but doesn't have a clear all button that I need. Also, I don't like the look of spreadsheet for my simple to-do list. Makes it more intimidating :D For a more complicated list its great though.

Thank you!

TonyM

unread,
Jul 14, 2019, 10:39:05 PM7/14/19
to TiddlyWiki
Adam,

Unless there is a bug the solution is most likely wikitext not javascript. 

In the side bar currentTiddler is not set. Since everything in the side bar can be the current tiddler if you get what I mean.

Use the tiddler widget or a list to get a value for current tiddler and it just may solve your problem.

If not return here with more info, show us the content of your sidebar tiddler etc...

Regards
Tony

Mohammad

unread,
Jul 14, 2019, 11:11:35 PM7/14/19
to TiddlyWiki
Hi Adam,
 Wait few hours and I will update the tiny todo list plugin today with what you like to have
 [] done/undone all items
 [] archive completed items
 
I just worry to be criticized  for making it complex!

--Mohammad

Adam S.

unread,
Jul 15, 2019, 4:44:17 AM7/15/19
to TiddlyWiki
Thanks Tony!

Could you explain this: "Use the tiddler widget or a list to get a value for current tiddler and it just may solve your problem." in more detail? I looked at these widgets on the official tiddlywiki site but didn't understand what to do.

What I'm experiencing can be recreated (I'm doing exactly this) by simply adding the $:/tags/SideBar tag to the ChecklistExample tiddler in this tiddlywiki and then interacting with the ChecklistExample in the sidebar. 

Adam S.

unread,
Jul 15, 2019, 4:52:41 AM7/15/19
to tiddl...@googlegroups.com
That is great Mohammad! Thank you! I understand your concern, I think it is implemented in a neat way here because you can go to the plugin settings and check off the close all button if you don't want it. Other than that I only have one question: how can I make your list not appear to be in a table?

TonyM

unread,
Jul 15, 2019, 7:05:43 AM7/15/19
to TiddlyWiki
Adam,

First your problem.

If you go to https://grosinger.net/tw5-checklist/#ChecklistExample and tag that tiddler with $:/tags/SideBar or alternatively for outside the tabs $:/tags/SideBarSegment

  • It will then appear in the sidebar. When using it in the side bar it fails on enter or + for a new item
  • The Side bar Differs from when a tiddler is displayed in the "story" It has no current tiddler.
  • It appears that The implementation of tw-5 Checklist does not take account of this case.
  • I ensured there was a current tiddler set in the checklist tiddler and it now works
<$tiddler tiddler="ChecklistExample">
! My Shopping List


[ ] More items
[ ] Test
[ ] Milk
[ ] Eggs
[x] Bread


</$tiddler>

explain this: "Use the tiddler widget or a list to get a value for current tiddler and it just may solve your problem." in more detail? 

Most widgets default to using or changing the currentTiddler variable

Eg
<$view field=caption />
Defaults to currentTidder because I did not provide the tiddler name

Consider this
<$list filter="[is[current]tagging[]]">

</$list>
This will identify all the tiddlers tagged by the current one and list one after the other
It is really saying

<$list filter="[is[current]tagging[]]">
  <
<currentTiddler>><br>
</$list>

However If I stop the default use of currentTiddler I can only get the result like this.

<$list filter="[is[current]tagging[]]" variable=selectTiddler>
  <
<selectTiddler>><br>
  <
<currentTiddler>><br>
</$list>
  • I invented the variable selectTiddler
  • Because I gave it as the variable name it will change to each tiddler that has the current tagging it.
  • In this case currentTiddler will remain the value it was previously.
I hope that helps

Regards
Tony

Adam S.

unread,
Jul 15, 2019, 10:49:26 AM7/15/19
to TiddlyWiki
Thank you very much Tony! It works flawlessly. I appreciate the explanation too! 

Mohammad

unread,
Jul 15, 2019, 12:57:16 PM7/15/19
to TiddlyWiki
Hi Admas!
 It uses a table for UI layout, you can remove table in todolist-ui and use what other element like ul.
By the way the new release is out there.

Good luck
Reply all
Reply to author
Forward
0 new messages