> I had arrived at the same conclusion - yet I haven't been able to figure
> out why my shadow tiddler modifications* are not taken into account (I'd
> tried all sorts of refresh calls and whatever else I could think of).

I GOT IT!!!!

** slice values are cached **

When a *real* tiddler is modified, store.saveTiddler() actually
deletes/recreates the tiddler in the store, which performs:
   delete this.slices[title];
so that subsequent attempts to retrieve a slice from that tiddler will
re-calculate the cached slice values.

Of course, modification of a shadow definition does not invoke
store.saveTiddler(), since the shadow is not saved in the store.

Thus, while the underlying shadow tiddler content has changed, any
cached slice values are not automatically updated.

Fortunately, you can force the slice values to be updated by invoking
the following line of code after modifying the shadow content:

store.slices["ToolbarCommands"]=
  store.calcAllSlices("ToolbarCommands");

I tried this in a vanilla TW... and it works.

enjoy,
-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