So to clarify
<<foo "hello>>
will invoke config.macros.foo.handler if it exists, if this does not
exist it invoke
jQuery.fn.tw_foo(args,env) with
this - set as the jQuery object equivalent to place in old-style
macros (so this[0] is place)
args - a hashmap of the argurments passed to the foo macro, in this
case {"1":"hello"}
env - a hashmap of the tiddlywik environment, that is:
{"macro":macro,"wikifier":wikifier,"tiddler":tiddler,"paramString":params,"store":store,"story":story}
note that args will use any named arguments to foo and unnamed
arguments will be given a name based on their position so
<<foo x:"hello" y:"goodbye">> with have args {"x":"hello","y":"goodbye"}
whereas
<<foo "hello" "goodbye">> with have args {"1":"hello","2":"goodbye"}
Martin
2009/1/31 FND <[email protected]>:
>
>>> Arguments to macros are passed as named values
>> [...]
>> From previous conversations, I assume the tiddler, wikifier and
>> macroName arguments now reside in args.tw?
>
> I take it the raw paramString is also being passed so macros can do
> their own parsing if the simple name/index mapping does suffice?
>
>
> -- F.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---