Re: Another To Do List Possibility

44 views
Skip to first unread message

Paul Kronenwetter

unread,
Jun 27, 2008, 2:30:57 PM6/27/08
to TiddlyWiki, Tiddly...@googlegroups.com
All, CC'ing TiddlyWikiDev (I hope) to bridge and continue the thread
over there.

Tobias,

The title.replace(/'/g,"&#x27") fixes the single quote problem that
Morris found. The /'/g part is a regular expression to replace all
instances of a single quote with "&#x27" which is the javascript
version of the HTML entity code %27 or a single quote. I think Eric
was generating code quickly, on the fly and just missed putting the
replace(...) code in for setValue, it is needed.

I did some work last night converting the plugin to use fields
instead of <data> elements. Before doing a lot more, let me get that
code and Tobias's contributions into TiddlySpot and pastebin. I'll
have time this evening. As for SVN access, that's a big step isn't
it? ;). I wouldn't want anyone to get the idea that I know what I'm
doing...

Eric - As for why this, originally, used the DataTiddler plugin. I
wanted to see if I could do this plugin using a form from Udo's
FormTiddler plugin. From there it grew into an investigation of how
to reference objects from various places within the document.
Needless to say it got too complex and, being in the midst of it, I
needed another mind to tell me that I was going down a needlessly
complicated path.

Thanks!
-Paul

On Jun 27, 1:12 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> Hi Eric,
>
> > 2) However... it isn't clear to me why you are using DataTiddlerPlugin to store the checkbox state information.
>
> I had the same thought, however I was not sure how field data getting
> and setting was achieved, so I did not fiddle with that as well while
> playing with Pauls code. Thanks for the reference on how this is done
> with CheckboxPlugin. I guess looking at its code may be a good start
> to understand how to use native tiddler fields instead of <data>
> markup within a tiddlers content.
>
> >   text+="value='"+store.getValue(title.replace(/'/g,"&#x27"),"task"+i)
>
> What is -- title.replace(/'/g,"&#x27") -- for and why is it only done
> when getting but not when setting field data? Why not simply use
> '+title+' as you did for setting?
>
> I believe you made a little mistake and forgot to reference to the
> fieldname when setting, so that...>  text+=" onchange='store.setValue("+title+",this.value)' ></html>|";
>
> should rather look like this:
>
> >  text+=" onchange='store.setValue("+title+","task"+i,this.value)' ></html>|";
>
> Is that correct?

Paul Kronenwetter

unread,
Jun 29, 2008, 12:01:52 PM6/29/08
to TiddlyWikiDev
It took me a bit longer than expected, but version 0.0.3 is on
http://kronenpj.tiddlyspot.com/. I have not updated pastebin at this
point. This version uses fields rather than the DataTiddlerPlugin, so
tiddlers with previous data will not show up as expected.

Thanks to Tobias for working on this with me! Thanks Eric and Morris
for your input as well!

-Paul

FND

unread,
Jun 30, 2008, 6:39:22 AM6/30/08
to Tiddly...@googlegroups.com
> As for SVN access, that's a big step isn't it?

Not really - it's essentially just storage with revision history, and
not hard to get used to.
If you're on Windows, TortoiseSVN integrates with Windows Explorer and
makes it very easy to use Subversion.

> It took me a bit longer than expected, but version 0.0.3 is on
> http://kronenpj.tiddlyspot.com/.

You probably want to send this to the Users group, as people will be
interested in that.


-- F.

Paul Kronenwetter

unread,
Jun 30, 2008, 8:58:37 AM6/30/08
to TiddlyWikiDev
Fred - Thanks for the voice of support. I think I'll wait a day or
two to see if anyone sees any problems with it. I'm about to start
actually trying to use it myself, so hopefully it'll cough up any
hairballs soon. :)

-Paul

Tobias Beer

unread,
Jun 30, 2008, 11:50:48 AM6/30/08
to TiddlyWikiDev
Hi Paul,

I like that you managed to get "fields" working for your plugin!

A few minor things...

1) Is there any reason other than personal taste for using the
circumflex (^) for moving a task up?
See here... http://img170.imageshack.us/img170/8048/listmn5.jpg

Unfortunately there is no downward pointing equivalent to it ...like
there is when using the two named html entities:
∧ (&and;) and ∨ (&or;)

You might even want to check out these... though I have no idea which
ones are reliable across browsers:
˄ (#x2C4;) ˅ (#x2C5;)
↑ (#x2191;) ↓ (#x2193;)
▲ (#x25B2;) ▼ (#x25BC;)
▴ (#x25B4;) ▾ (#x25BE;)

2) If you wanted the table to be borderless as it is assigned through
the class "noBorder" in the code... you need to change the StyleSheet
tiddler, like I mentioned in the thread over at the TiddlyWiki group.

3) You might want to prefix any fields used with "tdp" or even "tdp_"

4) There shouldn't be any "dependencies" other than maybe the class
definition for "noBorder" in StyleSheet, is that correct?


Unfortunately... there is one major issue, I fear...
Using fields, the code now seems to run MUCH slower, especially when
increasing the number of tasks.

Here is what I guess would bring performance back to what it was:
Instead of using one field for each item/parameter that needs to be
saved... use one field for all TodoListParams and parse this field for
actual parameters as needed directly from within the code.

However - in a way - that would pretty much do what Udo's
DataTiddlerPlugin does which brings me to the idea of having an
adaptation of it to actually parse (maybe JSON formatted) data, not
from <data> markup within a tiddlers body but rather from any "named
field" that it is asked to process. I have no idea how big a change
that would be to Udo's plugin code. Has anyone else ever thought of a
"parser" (if that's the correct term) on data contained within ONE
field instead of many (hopefully&meaningfully) prefixed ones? Why
would I think that is a good idea... looks like performance is an
issue and it would reduce unnecessary "field-clutter" or even data
conflicts of plugins accidentally using the same fieldnames to store
values. As for that, I think it were a good idea to have everyone
using fields make a reference to their plugins which use them in a
list right here: http://www.tiddlywiki.org/wiki/Extended_Fields

wolfgang

unread,
Jun 30, 2008, 12:48:21 PM6/30/08
to TiddlyWikiDev
Hi Tobias,

> .. As for that, I think it were a good idea to have everyone
> using fields make a reference to their plugins which use them in a
> list right here:http://www.tiddlywiki.org/wiki/Extended_Fields

So that you don't have to wait til that happens, I made a quick
YourSearch on TiddlyVault - and it showed the following plugins have
to do with fields:

DebugFieldsMacro
http://tw.lewcid.org/sandbox/#DebugFieldsMacro

FieldsEditorPlugin
http://visualtw.ouvaton.org/VisualTW.html

Encrypted fields plugin
http://visualtw.ouvaton.org/old/previous.html#%5B%5BEncrypted%20fields%20plugin%5D%5D

NewTiddlerWithFieldsMacro
http://tampageekland.tiddlyspot.com/#NewTiddlerWithFieldsMacro

ScrubTiddlerFields Bookmarklet
http://lewcid.org/tiddlywiki-bookmarklets/

DataTiddlerPlugin
http://tiddlywiki.abego-software.de/#DataTiddlerPlugin

EasyEditPlugin
http://visualtw.ouvaton.org/VisualTW.html#EasyEditPlugin

EditListbox macro
http://visualtw.ouvaton.org/old/previous.html#%5B%5BEditListbox%20macro%5D%5D

FileLinkDropHandler
http://scphillips.com/tiddly.html#FileLinkDropHandler

FormTiddlerPlugin
http://tiddlywiki.abego-software.de/#FormTiddlerPlugin

ListboxPlugin
http://www.tiddlytools.com/#ListboxPlugin

TaskViewBuilderPlugin
http://www.hawksworx.com/playground/TeamTasks/#ValueTogglerPlugin

TiddlerListMacro
http://jackparke.googlepages.com/jtw.html#TiddlerListMacro

WikifyPlugin
http://www.tiddlytools.com/#WikifyPlugin

iFrameEditorPlugin
http://visualtw.ouvaton.org/VisualTW.html

NewMeansNewPlugin
http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin

Regards,

W.

Paul Kronenwetter

unread,
Jun 30, 2008, 1:07:34 PM6/30/08
to TiddlyWikiDev
Tobias,

1. For me, the &and; symbol appeared as a teeny circle, so I changed
it to something that at least pointed somewhere. I like the #25B2/
#25BC characters and have updated the tiddlyspot script with them.

2. I wanted a way to include the style within the output from the
script, but hadn't taken the time to adjust the "chrome" while the
functionality was broken. I've updated the TS script with a no-border
style sheet.

3. I've changed the field names to be prefixed with 'tdp' since that
seems to be a really good idea. Of course, existing tiddlers will
again be empty, except for N empty / undefined tasks with no
checkboxes ticked. Sorry.

4. This plugin uses both the CheckboxPlugin and InlineJavascriptPlugin
extensively, so they are truly dependencies. With the change in #2,
a changed stylesheet is not a dependency.

I haven't given the script enough data to see a performance problem,
either with fields or <data> elements. That could be a problem...
I'm sure a lot of the performance would be due to the script iterating
over the entire field set to display updates. Maybe better placement
of the refreshTiddler calls could be examined. Although, going back
to using DataTiddlerPlugin wouldn't be difficult as I still have the
code around... If it's truly faster, then it might be something to
consider.

-Paul

On Jun 30, 11:50 am, Tobias Beer <beertob...@googlemail.com> wrote:
> Hi Paul,
>
> I like that you managed to get "fields" working for your plugin!
>
> A few minor things...
>
> 1) Is there any reason other than personal taste for using the
> circumflex (^) for moving a task up?
> See here...http://img170.imageshack.us/img170/8048/listmn5.jpg

Tobias Beer

unread,
Jun 30, 2008, 4:45:04 PM6/30/08
to TiddlyWikiDev
Hi Paul,

I guess I was a bit quick about the cause of those performance
issues... it is not that there aren't any, but rather that they don't
seem to depend too much on whether you use fields or
DataTiddlerPlugin. Have you created a list with about 10 tasks and
tried to move those up and down or to add and remove items... for me
that's really quite slow @ 2GHz P4. Without wanting to complicate
things, but in order to change a task list efficiently the current
implementation doesn't seem to be all that performing. I am wondering
if it may be better to implement a dedicated "edit mode" - one that
doesn't refresh the tiddler display each time where changes are only
saved on a dedicated "commit" action. On the other hand... if it takes
ages to make changes - at a certain, rather quickly attained size of a
list - it might turn out to be more efficient doing good 'ol txt
editing a la copy&paste ;-)

Paul Kronenwetter

unread,
Jun 30, 2008, 5:06:18 PM6/30/08
to TiddlyWikiDev
Tobias,

I've just created a list of 16 items with the fields version.
Adding and moving each take maybe one second. Deleting takes several
seconds, probably because of all the swapping it's doing to move the
element to the bottom of the list.

So, moving an item added to the top of the list takes N seconds, and N
clicks / mouse movements. Deleting an item from the bottom of the
list takes about a second, and from the top perhaps N/2 seconds (mine
is ~6 seconds from a 16-element list). Still, not very scalable... :(

I have a thought for improving re-sorting and maybe deleting, but let
me think about that more. In a few seconds I've gone from "hey neat
idea" to "well, that may not really work too well." I'll see if I can
come up with a few more of the first type.

Other than performance, how is it working for you? It seems pretty
stable and consistent for me.

-Paul

PS: I'm also trying to keep the DataTiddler version (ToDoPluginDT)
functionality current with the fields version. I think in some
situations I may prefer to be able to edit <data> tags rather than
fiddle with fields.

Tobias Beer

unread,
Jun 30, 2008, 5:12:18 PM6/30/08
to TiddlyWikiDev
Hi Wolfgang... thanks for the list and / or the little tutorial (aka
reminder) on how to find stuff ;-)

Tobias Beer

unread,
Jun 30, 2008, 5:18:00 PM6/30/08
to TiddlyWikiDev
The reason why removing a task from the top of the list takes longer
actually is due to swapping items... yet, it wouldn't take that long
if you'd remove refreshJs from swapJs and instead put it into each of
the commands that require refreshing the tiddler display.

Tobias.

wolfgang

unread,
Jun 30, 2008, 5:56:26 PM6/30/08
to TiddlyWikiDev
Actually I really like your concept of a todo list.

Though I'm pretty sure you knew how to find stuff ;-)
but maybe you didn't consider that most of those listed plugins aren't
developed any further, therefore I doubt that many developers would
care to update theirs on a list at http://www.tiddlywiki.org/

Can't help with the coding though,

W.

Paul Kronenwetter

unread,
Jul 1, 2008, 9:49:26 AM7/1/08
to TiddlyWikiDev
Tobias - Good point. I've fixed the TiddlySpot version. I was trying
to reduce the number of times the code appeared in the source, not
considering the iterative concequences :)

Thanks!
-Paul

Paul Kronenwetter

unread,
Jul 2, 2008, 4:24:41 PM7/2/08
to TiddlyWikiDev, Tiddl...@googlegroups.com
All,

I've added another option to the ToDoPlugin code. It's now possible
to display complete tasks interspersed with incomplete items or as a
separate list below the incomplete list. The option is selected by
opening the plugin tiddler and selecting the option.

Version 0.1.0 of the plugin is available from my tiddlyspot page:
http://kronenpj.tiddlyspot.com/

I welcome any comments or problem reports here or via email to my
gmail address.
Share & enjoy!
-Paul

(CC'd to TiddlyWiki group as a release announcement)

Xavier Verges

unread,
Jul 4, 2008, 3:54:22 AM7/4/08
to TiddlyWikiDev
Cool! I've liked
* having links render as links when items are completed
* being able to specify the previsouly-too-narrow width

Nice work!


> (CC'd to TiddlyWiki group as a release announcement)
I'm not sure if it made it there.

-Xv

Paul Kronenwetter

unread,
Jul 6, 2008, 9:51:06 PM7/6/08
to TiddlyWikiDev
Xavier,

Thanks for the praise... I'm thinking about making an "edit" mode
where the incomplete items are also rendered in standard Wiki form,
but I haven't quite figured out how I want to do it yet. :)

Any other suggestions?
-Paul

Paul Kronenwetter

unread,
Jul 27, 2008, 10:40:29 PM7/27/08
to TiddlyWikiDev, Tiddl...@googlegroups.com
For anyone who might be using my plugin, I've put a bit of work into
both the fields- and JSON-based versions this weekend and have
released version 0.2.0 of both. It's on my tiddlyspot page (http://
kronenpj.tiddlyspot.com/)

I've added another option, when Eric's NestedSliders plugin is
present, to include an "edit" button between the delete task button
and the checkbox . When the feature is enabled, the task appears as
normal text and the edit button reveals a text entry box. This is the
concept I mentioned in the previous post on the Dev list. Thanks to
Eric's plugin, it was very easy to create.

I've also cleaned up the code as it was repetitive and pretty
embarrassing. In doing so, I've replaced the code that used the
CheckboxPlugin in the forms plugin with HTML and form handling used by
the JSON plugin. I am also preparing to merge these two into a single
plugin that handles both fields and JSON lists dynamically. I already
have a plan for implementing it, but I wanted to get this version in
the wild first.

They both should be backward compatible with any existing to do lists
created earlier so the upgrade should be safe. If you find otherwise,
or have any suggestions for improvements, I'd love to hear them!

-Paul

Ken Girard

unread,
Jul 28, 2008, 3:39:05 PM7/28/08
to TiddlyWikiDev
I am sure you will be as shocked as I was that this didn't work with
IE6 (Yes, this is sarcasm... and now I have "This is SARCASM!" as an
idea for an avatar).

Both ToDoPlugin & ToDoPluginDT showed up with "Error: Expected
identifier, string or number"

Ken Girard
> > > > > > Tobias.- Hide quoted text -
>
> - Show quoted text -

Paul Kronenwetter

unread,
Jul 29, 2008, 8:40:59 AM7/29/08
to TiddlyWikiDev
Ken - Well, I guess that doesn't surprise me. I'll point IE at it and
see what needs fixing. I see that you've guessed that I don't use IE
that much. ;)

Thanks!
-Paul

Paul Kronenwetter

unread,
Jul 29, 2008, 10:42:48 AM7/29/08
to TiddlyWikiDev
Thankfully there are standards, so many to choose from and so many
ways to interpret them. Apparently the Gecko JS engine quietly
ignores a trailing comma after a closing brace without an identifier,
string or a number. IE isn't so forgiving. Fixed. :)

Thanks Ken!
-Paul

PaulAugust

unread,
Jul 30, 2008, 6:17:41 PM7/30/08
to TiddlyWikiDev
I like this... have it working from tiddlyspot. Access it from my
desktop and my iPhone. FYI... I am testing from IE6, IE7, and
iPhone. :)

So, just a thought... would be nice to wikify the task... then I could
put a tiddler name in there and link to it. For example:

Task 2 - Go to Store [[StoreList]]

Then when you clicked on [[StoreList]] it would open the StoreList
tiddler which had all the stuff you needed to get.
> > > > - Show quoted text -- Hide quoted text -

Paul Kronenwetter

unread,
Jul 30, 2008, 6:44:36 PM7/30/08
to TiddlyWikiDev
Paul,

I'm glad you like this, it's been a good learning experience coding
it! As for the text, it is wikified otherwise the <script> tags and
such wouldn't work. I also just tested it with the version on
http://kronenpj.tiddlyspot.com/. I added ToDoExampleEmpty to one of
the incomplete tasks and it behaves as I think you'd like it to... It
won't work from within the text box, but I don't think that's what
you're asking for.

If it's still not working for you, would you consider making an
example file available somewhere?

-Paul

PaulAugust

unread,
Jul 30, 2008, 7:02:42 PM7/30/08
to TiddlyWikiDev
Paul,

I think I'm confused (not a new experience! LOL)...

What I was thinking was it would be nice to wikify the text (somehow
magically)... for instance, on your page in the ToDoSamplePopulated,
assume that Task One was "Finish DefaultTiddlers", and that
DefaultTiddlers was wiki-link, so when you clicked on it, you opened
up the DefaultDittlers tiddly.

I'm not sure what you meant when you said you "added ToDoExampleEmpty
to one of the incomplete tasks...". I went to the page, and didn't see
anything that appeared to be linked within the task lists.

Confused, but having fun anyway...

--The Other Paul

On Jul 30, 3:44 pm, Paul Kronenwetter <krone...@gmail.com> wrote:
> Paul,
>
>  I'm glad you like this, it's been a good learning experience coding
> it!  As for the text, it is wikified otherwise the <script> tags and
> such wouldn't work.  I also just tested it with the version onhttp://kronenpj.tiddlyspot.com/.  I added ToDoExampleEmpty to one of

Paul Kronenwetter

unread,
Jul 30, 2008, 8:46:38 PM7/30/08
to TiddlyWikiDev
Of course, it would help if I actually uploaded my experiments
wouldn't it? I've added two tasks to the end of the Populated
example. I see the last two as having "normal" wiki links. I hope
this helps clear up what I'm babbling about.

-Paul

PaulAugust

unread,
Jul 31, 2008, 2:22:50 AM7/31/08
to TiddlyWikiDev
But that only works when the task is completed, correct? Now I'm
wondering about usability issues...

So... let me see if I understand the usability flow:
1) Add task... creates record in "text box" format. Enter data.
2) Save tiddly page
3) Refresh... record still in "text box" format (its not
completed).
4) Set task as completed... stays in "text box" format
5) Save page
6) Refresh... now "wikified"...

What about:
1) Add task... creates record in "text box" format.
2) Save tiddly page
3) Refresh... record "wikified" with an edit button (toggle edit/
view format)?

Then you could link to tiddlers while the task is still active...
Would provide huge flexibility when a task is in "active" status,
allowing the user to create a generic "todo" with external links.
Alternatively, create multiple specialized todolists with the data
embedded (which you can do with the current version), but when adding
text to the todolist, you are in edit mode and can no longer see the
task list itself.

Just some thoughts. What do you think?

--The Other Paul

Paul Kronenwetter

unread,
Jul 31, 2008, 6:37:41 PM7/31/08
to TiddlyWikiDev
Agreed, although the tiddler should be refreshing when you set the
task as complete in step 4, without needing to refresh. I'll take a
look at that on IE.

Although rendering as text instead of a text entry box is available,
take a look at the "Try to use slider floating entry box rather than
always showing entry boxes." option (within the plugin itself). If
you have Eric's NestedSlider plugin available, it'll always render
text and give you an edit "button" for incomplete tasks. See if
that's what you have in mind.

Thanks!
-Paul
Reply all
Reply to author
Forward
Message has been deleted
0 new messages