Say i store values in two tiddlers and i want to add those values through a
javascript macro in tiddlywiki. So i tried the following, but it keeps
showing that this.getTiddler is not a function. I would like to understand
how to do it.
exports.name = "add";
exports.params = [{
name: "var1"
}, {
name: "var2"
}];
exports.run = function(var1, var2) {
var t1=$tw.utils.parseFields(this.getTiddler(var1).fields.text);
var t2=$tw.utils.parseFields(this.getTiddler(var2).fields.text);
var t3=t1+t2;
return t3;
}
})();
--
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/f643b430-9152-4ed3-8c9d-8f19c94b214b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.