Hi Mario thanks for that.
For example, I'm doing a simple macro that will create a graph (just a simple SVG text) based on existing tiddlers. I can render the SVG and also retrieve the tiddlers using $tw.wiki.forEachTiddler. The problem is that the macro is called *only* when the page is loaded and when the tiddler that contains the macro changes, but *not* when any other tiddler change. That means that the SVG doesn't get updated unless that I close and open the tiddler containing it.. In this case, would you write a widget instead ? thanks again On Wednesday, 17 July 2019 21:18:31 UTC+1, PMario wrote: > > Hi, > > TW macros are relatively simple. eg: > > \define test(parm1) this is param1 $param1$ > > Where param1 is a "text substitution". Javascript macros have a more low > level access to $tw. functions, but they are just "text substitutions". > > widgets <https://tiddlywiki.com/dev/#WidgetModules>have much more > possibilities in their livecycle. eg. init(), execute(), render(), > refresh() and a lot more. > > Macros have to be parsed every time they are executed, widgets only > refresh elements / children that really changed. > > This is not 100% correct, but it should give you a hint. > > -m > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/b3bffcca-0409-4693-989b-92e2c92d5fff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
