Hi!

How do you force TiddlyWiki to refresh/restart? I thought
refreshDisplay() refreshed the display and restart(); restarted the
wiki, but apparently they don't always. For example, I'm using fET
with a script to generate buttons to remove/add a tag from/to a
tiddler, for example:

<<forEachTiddler where 'tiddler.tags.containsAll(["link","Trash"])'
sortBy 'tiddler.title.toLowerCase()' ascending
write '"<script label=\"restore\" title=\"restore
\">store.setTiddlerTag(\""+tiddler.title+"\",false,\"Trash\");
autoSaveChanges(); refreshDisplay();</script>}}}| "+tiddler.text
+"\n"'
none '"Trash Can is empty"'>>

It removes the tag and saves, but it doesn't refresh.

But if I use the following script, it refreshes:
<script label=\"delete
\">config.commands.deleteTiddler.sendToTrash(\""+tiddler.title+"\");
autoSaveChanges(); refreshDisplay();</script>

The same with:
<script label=\"delete
\">config.commands.deleteTiddler.handler(undefined,undefined,
\""+tiddler.title+"\"); autoSaveChanges(); refreshDisplay();</script>


As for restart();, I have the following script that enables/disables
the TrashPlugin (adds/removes systemConfigDisable tag):
<script>
var tiddler = store.getTiddler("TrashPlugin");
if (tiddler && !tiddler.isTagged('systemConfigDisable'))
wikify("[[Trash Can]] {{scriptbutton{<<emptyTrash>>}}}<br/><br/
>{{extralineheigh{{{scriptbutton{<script label=\"Disable Trash Can\"
title=\"Disable Trash Can\">store.setTiddlerTag(\"TrashPluginMod
\",true,\"systemConfigDisable\"); autoSaveChanges(); refreshDisplay();
restart();<\/script>}}}}}}", place)
if (tiddler && tiddler.isTagged('systemConfigDisable'))
wikify("{{scriptbutton{<script label=\"Enable Trash Can\" title=
\"Enable Trash Can\">store.setTiddlerTag(\"TrashPluginMod\",false,
\"systemConfigDisable\"); autoSaveChanges(); refreshDisplay();
restart();<\/script>}}}", place)
</script>

It adds/removes the tag, saves and refreshes, but it doesn't restart,
the TrashPlugin is still active.

Any ideas?

w

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to