Hi Andrew
The main problem is JavaScript's peculiar habit of overwriting 'this'
within nested functions. Try this:
exports.startup = function () {
// Install the clock mechanism
this.actionTiddler = "$:/temp/clock";
var self=this, timer=setInterval(function(){
var d=new Date();
var t=d.toLocaleTimeString();
self.actionValue = t;
self.wiki.setText(this.actionTiddler,text,null,this.actionValue);},250);
};
You also need to give your module a "module-type" field with the value
"startup".
Best wishes
Jeremy
On Thu, Feb 19, 2015 at 1:36 PM, Andrew <[email protected]>
wrote:
> I know it has been over a year but after alot of learning and reading all
> messages again, I discovered one of jeremy's responses about my clock and I
> thought I would try to tackle it again. When I put startup module-type in
> and save and reload, well, obviouly I don't know how to program. Anyone
> interested in helping?
> http://t5a.tiddlyspot.com/#%24%3A%2FModules%2FStartup%2FClock.js Just
> trying to follow jeremy's suggestion of a system tiddler that automatically
> updates with the time.
>
> --
> 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/d/optout.
>
--
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/d/optout.