I am trying to create a button with an accompanying edit-text widget that
will (a) create a new tiddler with the title entered in the edit-text
widget box, (b) edit the description field of the new tiddler as specified
below, (c) assign multiple tags to the new tiddler (as below), and (d)
append the current date to the title of the new tiddler.
The following macro achieves objective (a) through (c):
\define newentry()
> \define tmp() {{$:/temp/newtitle}} <<now>>
> <$button>
> <$action-sendmessage $message="tm-new-tiddler" title={{$:/temp/newtitle}}
> description=<<now "ddd, mmm DD, YYYY - 0hh:0mm $(currentTiddler)$">>
> tags="BM GL [[Hello World]]"/>
> New Entry:
> </$button>
> <$edit-text tiddler="$:/temp/newtitle" tag="input" default=""/>
> \end
However, (d) is proving very difficult. I've tried passing a macro to the
title attribute of the action-sendmessage widget, but the result is the
literal string of the macro call, e.g.:
\define newentry()
> \define newtitlemacro() {{:/tempnewtitle}} <<now YY-MM-DD>>
> \define tmp() {{$:/temp/newtitle}} <<now>>
> <$button>
> <$action-sendmessage $message="tm-new-tiddler" title=<<newtitlemaro>>
> description=<<now "ddd, mmm DD, YYYY - 0hh:0mm $(currentTiddler)$">>
> tags="BM GL [[Hello World]]"/>
> New Entry:
> </$button>
> <$edit-text tiddler="$:/temp/newtitle" tag="input" default=""/>
> \end
but the resulting button/text field creates a new macro entitled
"<<newtitlemacro>>"). As seen above, I'm able to pass macros to the
description attribute of the action-sendmessage widget, so I'm not sure why
the title attribute takes literal strings only.
--
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/647a02c3-c1f0-450d-be17-3c65f9020729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.