> 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.

The <<toolbar>> macro takes a list of toolbar handler names (e.g.,
"editTiddler", "saveTiddler"), *not* a slice reference.  The reason
the [[ToolbarCommands::...]] slice reference works at all is because
it occurs within a *template*, and template content is retrieved
using:

Story.prototype.getTemplateForTiddler =
function(title,template,tiddler)
{
        return store.getRecursiveTiddlerText(template,null,10);
};

which recursively fetches and *inserts* any content from embedded
"[[TiddlerName]]" references before passing the fully-expanded
template definition to the browser for initial rendering, followed by
a call to applyHTMLMacros() to process any TW macros that are stored
as attributes of the resulting DOM elements.

Thus, by the time the macro="toolbar ..." attribute is actually
handled, the slice reference has already been replaced by it's
respective value, and the macro only sees a list of toolbar commands,
not the original slice reference that defined the list.

HTH,
-e

-- 
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.

Reply via email to