I have been learning about javascript macros recently and was trying to create a simple one to start with, but I can't seem to get it to work. I've read lots of documentation, forums, etc., but still can't seem to figure out why it won't work. Here is what I've been doing. I set up two tiddlers, JsTiddler and RunTiddler. I added a very simple javascript macro to JsTiddler, and set its type = "application/javascript" and module-type = "macro". Here is the text: /*\ title: JsTiddler type: application/javascript module-type: macro \*/ (function(){
/*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; exports.name = "jstiddler"; exports.params = []; /* Run the macro */ exports.run = function() { return "Hello World"; }; })(); I then created a second tiddler to import and display the macro called RunTiddler. This is its text: <$importvariables filter="[[JsTiddler]]"> <$macrocall $name="jstiddler" /> </$importvariables> However, when I run this, all I get is a blank tiddler. I have tried filtering in different ways (such as using tags), but that didn't help either. I have also been able to use <<now>> and <<version>> in both <<>> and <$macrocall> syntax, so I know that my wiki can use js tiddlers. Can anyone tell me what I'm doing wrong? Thanks. -- 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 tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. 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/93dda77e-b8a7-4eeb-90ad-a4256ae78455%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.