I got something to work. Here
<http://t5a.tiddlyspot.com/#%24%3A%2FModules%2FStartup%2FClock.js> I tried
using instead:

exports.startup = function() {
    var timer=setInterval(function(){
    var d=new Date();
    var t=d.toLocaleTimeString();
    $tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/temp/clock", text: t}));
},250);
};


On Sun, Feb 22, 2015 at 12:16 AM, Andrew <[email protected]>
wrote:

> ok, so I get Uncaught TypeError: Cannot read property 'setText' of
> undefined
>
> On Friday, February 20, 2015 at 9:57:24 AM UTC-7, Jeremy Ruston wrote:
>>
>> Hi Andrew
>>
>> > Thank you for looking at this. Well, I tried it and now I have a
>> setText error message. I'm wondering if I'm trying to do something before a
>> function is defined? I can't run developer tools from my phone. Do I have
>> to pass "text" and "null" as params? I thought that setText didn't need
>> them.
>>
>> Wow, I would never have guessed that you'd be doing this on a phone,
>> that's pretty impressive. I fear it may also be impractical to do JS
>> development without being able to see the error messages.
>>
>> Anyhow, wiki.setText is defined like this:
>>
>> exports.setText = function(title,field,index,value) {
>>
>> So, when you call it, you basically need to specify all those parameters
>> (you can omit unused ones at the end of the list, but in this case you want
>> to pass a value for the parameter "value", which is at the end of the list).
>>
>> What does the error message say?
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>>
>>
>>
>> On Thu, Feb 19, 2015 at 7:21 PM, Andrew <[email protected]> wrote:
>>
>>> Thank you for looking at this. Well, I tried it and now I have a setText
>>> error message. I'm wondering if I'm trying to do something before a
>>> function is defined? I can't run developer tools from my phone. Do I have
>>> to pass "text" and "null" as params? I thought that setText didn't need
>>> them.
>>>
>>> --
>>> 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 a topic in the
> Google Groups "TiddlyWikiDev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywikidev/qwyXraJ6bkI/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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.

Reply via email to