While trying to create a button that resets the *created* date on a 
tiddler, I absentmindedly tried the following:

\define now-timestamp() <<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>>
<$button set="!!created" setTo=<<now-timestamp>>>
    Created Now
</$button>

Now, I'm aware this snippet doesn't work and can't be expected to because 
the contents of *now-timestamp* aren't wikified when the macro call is 
being used as a transcluded widget-attribute value. I've since produced a 
correct version. However, I'm still confused about the result of clicking 
the button: the *created* field was set to NaNNaNNaNNaNNaNNaNNaN. I'm 
puzzled by what kind of calculation the *setTo* attribute of the $button 
widget is doing that's able to create a bunch of concatenated NaNs. I would 
have expected to simply get the literal text <<now 
[UTC]YYYY0MM0DD0hh0mm0ssXXX>> in the field.

Is there something special about the *created* field in this regard?

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c302cd90-72d4-4d90-a341-733656b11894n%40googlegroups.com.

Reply via email to