It's unclear -- did you actually make the field "module-type" ? It's 
required. Also, did you save and reload? You have to save and reload every 
time you change the code.

When I tried your code, adding field "module-type" with value "macro", it 
worked. Aargh!!

HTH
Mark


On Wednesday, June 15, 2016 at 1:16:29 PM UTC-7, Jake Di Toro wrote:
>
> I feel like I'm fairly intelligent, but JavaScript Macros are making me 
> feel completely stupid and no reading of all the tiddlers on 
> tiddlywiki.com seem to be helping me.
>
> I'm good with java script itself.  I'm good is the need to make the type 
> "application/javascript".  I understand the 3 fields of "exports" (or at 
> least think I do).  But it doesn't seem to matter how I put this in I can't 
> seem to get any of my tiddlers to actually call my macros.  Is there a 
> specific tiddler name/pattern that the title has to be?  Is there a 
> specific tag that the tiddler needs?  Am I not supposed to type it in as a 
> tiddler, do I *need* to import it? 
>
> I've been struggling with this for a while, doing searches that seem to no 
> avail, but I'm not getting anywhere.  Please help.
>
> Test macro:
>
> created: 20160615195939654
> modified: 20160615201526650
> tags: $:/tags/Macro
> title: $:/macros/my/aargh.js
> type: application/javascript
>
> /*\
> module-type: macro
> \*/
> (function(){
> "use strict";
> exports.name ="aargh";
> exports.params = [];
> exports.run = function() {
>   return "AARGH!!!";
> };
>
> })();
>
> And yet when I call <<aargh>> I get nothing.
>

-- 
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/b67e49e4-560e-4126-9b75-b8ed0aeafb97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to