Hi Yoann
You're trying to invoke your function as a global, but it isn't defined as
one.
Here's roughly what you need to do to get things moving:
* update pendulum.js with the module-type "module", and an
"exports.pendulum = pendulum;"
* in mycanvas.js, remove everything after the export assignment
* At the top of mycanvas.js, have something like this:
var myFunctions = {
pendulum: require("$:/pendulum.js").pendulum,
blah: require("$:/blah").blah
};
* Then, to invoke your chosen function, do something like this:
myFunctions[this.getAttribute("display")](canvas);
Hope that helps,
Best wishes
Jeremy
On Tue, Nov 12, 2013 at 6:15 PM, Yoann Babel <[email protected]> wrote:
> maybe more convenient :
>
> http://ybabel.fr/code/pendulum.html
>
> --
> 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 http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Jeremy Ruston
mailto:[email protected]
--
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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.