The widget looks good!
you can have your widget take any number of inputs using this. The
attributes can have any name an there can be any number of them:
execute() {
this.currentSum = 0;
// Get parameters from our attributes
$tw.utils.each(this.attributes,function(attribute,name) {
this.currentSum += attribute;
}
// Execute the math
this.currentSum =
Number(this.val1) + Number(this.val2) + Number(this.val3) + Number(this.val4)
+ Number(this.val5);
}
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/608b98cd-8a79-465f-97f9-d5c9b22f8f8f%40googlegroups.com.