Hi S.S.
 I tried to prevent appending text to a NOT existing Tiddler (As Josiah 
noted above), but seems code gets too complicated!
Seems action-setfiled works to create tiddler if not existed and from 
programming point of view, I expect to warn and NOT to do that!

--Mohammad

On Sunday, April 7, 2019 at 2:29:45 PM UTC+4:30, S. S. wrote:
>
>
> Nice macro Mohammad! Works perfectly for a few random tests I made. 
>
>
> On Sunday, April 7, 2019 at 3:31:06 AM UTC+7, Mohammad wrote:
>>
>> Hi Josiah!
>>  This new version works ALSO with empty tiddlers
>>
>> \define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"<br>")
>> <$button> $btnLabel$
>> <$list variable="newText" 
>> filter="[<__tidTitle__>get[text]addsuffix<__sep__>addsuffix<__text__>]" 
>> emptyMessage="""<$action-setfield $tiddler=<<__tidTitle__>> 
>> text=<<__text__>> />""" >
>> <$action-setfield $tiddler=<<__tidTitle__>> text=<<newText>> />
>> </$list>
>> </$button>
>> \end
>>
>>
>>
>>
>>

-- 
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/8531299b-e337-4c76-aa8a-708972449e0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to