On Tuesday, October 3, 2017 at 11:51:25 PM UTC+2, [email protected] wrote:
>
> Thanks for the responses. I decided to go with the currentTiddler method,
> and since this macro is in javascript,
> some poking around in the tiddlywiki source shows that i can reference
> this.getvariable("currentTiddler") from inside the macro.
>
TLDR;
IMO you should describe the functionality, that you want to have a bit
closer. ... I think you want to use an approach that begs for trouble.
----------------- Reasoning ---------------------
Your described approach is very error prone and even you or your users (for
sure) will break it by accident.
lets say:
tiddlerOK ... is a tiddler where the macro is ok
tiddlerNok ... macro should not run
Now consider this:
tiddlerNok contains your macro for testing and you call it like this:
tiddlerOK contains the following code:
{{tiddlerNok}} <-- your macro may work
and
{{||tiddlerNok}} <-- macro fails since currentTiddler is still set to
tiddlerOK
The same may happen if you use the <$list> widget with the variable
parameter set to eg: variable="listItem". ... Inside the widget scope
currentTiddler isn't set. ... if the variable assignment is missing
currentTiddler will be set.
Constructions described above are all over the places. .. So I think it
will cause you quite some headache. .. If not immediately it may cause very
hard to find problems in the future.
just some thoughts!
mario
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/72c5f9cd-0f77-4277-a2ee-9074c78741c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.