Is this a bug, or just an unexpected feature?
If you open a window with message tm-open-window
using a template, the template can’t access global macros.
To see this, add code like:
<<tag "HelloThere">>
<<list-links "[tag[HelloThere]]">>
to the bottom of SampleWindowTemplate
at tiddlywiki.com , and then run this launch code from a tiddler:
<$button>Open Window
<$action-sendmessage
$message="tm-open-window"
$param="$:/temp/openme"
template="SampleWindowTemplate"
windowTitle="My Window Title"
width="640"
height="480"
something="This is my new window. There are many like it, but this one is mine." />
</$button>
This code was taken from tiddler WidgetMessage: tm-open-window
, but don’t use it’s launch bottom there – it doesn’t do anything! (which is another issue).
When the window launches, it will not contain the results of the inserted macro code.
In order to get the macros to work, you have to import them at the top of the template. Which is unexpected for global macros, at least to my way of thinking.