Joe,

Here is my complete log solution. Attached, download and drag to your wiki,.

The viewTemplate tiddler determines when to display it, currently on non 
system tiddlers, and the $:/PSaT/macros/ShowLogMacro tiddler details the 
macros that come with it for use in different ways.

Eg list items logged here on this tiddler, or all tiddlers, recent only 
etc... or log line or text area.
.
It uses some tricks to combine the date time stamp, and current tiddler 
into a line in a data tiddler, the log is wikified so can include links 
etc... The list log functions reverse it to be most recent first.

Regards
Tony


On Thursday, 3 January 2019 04:28:34 UTC+11, Joe Armstrong wrote:
>
> I have made a tiddler called [[Log1]] this is
> supposed to be a log file.
>
>
> I have a second tiddler [[AddToLog]] which is supposed to add a 
> time-stamped entry to the end of the log.
>
> It has a little text box to enter text with and a button
>
> AddToLog is like this:
>
>
>     \define appendButton(old,add) 
>        <$button set="Log1" setTo="$old$ <hr> At <<now>> <br> $add$"> add 
> to log</$button> 
>     \end 
>
>      <$edit-text tiddler="$:/temp/Append"/> 
>      <$macrocall $name="appendButton" old={{Log1}} add={{$:/temp/Append}}/>
>
> If I run the code in this tiddler ut some text in the edit button and click
> on 'add to log' the log gets appended with this:
>
>    <hr> 
>    At <<now>> <br> .. the text I entered ...
>
>  Which is wrong since I want <<now>> to be now (ie something like 
> 2019-01-02 ...) and NOT <<now>>
>
> I have tried many ways to program my way around this but they all fail.
>
> So how can I get the value of <<now>> now?
>
> I need to turn off the lazy evaluation.
>
> Cheers 
>
> /Joe
>
>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/723a8719-5255-40bd-8960-e8b85401d0e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: Show-Log-Macro.bundle.json
Description: application/json

Reply via email to