It appears that modifications of config.shadowTiddlers.ToolbarCommands
during runtime (after startup) are ignored by the toolbar macro or
template processing.
Example (execute from Firebug):
config.shadowTiddlers.ToolbarCommands.replace("editTiddler", "");
config.shadowTiddlers.ToolbarCommands.replace("saveTiddler", "");
Even after (re)opening tiddlers in view or edit mode, the edit/save
commands are still present in the toolbar.
I've spent some time tracing this, but couldn't quite figure out what's
going on. The toolbar macro is passed a slice reference from the
respective template ("[[ToolbarCommands::{View,Edit}Toolbar]]") - but
rather than doing its own getTiddlerText call for this parameter, its
handler is somehow invoked directly with the respective list of
commands, which appears to be cached on startup.
It seems like I'm missing something obvious, so a sanity check would be
appreciated.
background:
When I'm not utilizing TiddlyWeb for plugin development, I sometimes use
dynamic script loading to simplify the dev cycle:
http://fnd.lewcid.org/misc/PluginLoader.html
(uses http://github.com/FND/jsutil/blob/master/loadScript.js)
While this allows me to edit plugins' .js file and test changes with a
simple page reload (much like when using TiddlyWeb's devstore), scripts
are loaded asynchronously - which led to the observed effect.
-- F.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.