The documentation appears to be wrong. I put together code that seems to 
work.

\define folded-state2()
$:/state/folded/$(foldme)$
\end
<$set name="foldme" value={{$:/temp/mytoot!!titel}}>
<$button>Fold the thing

<$action-sendmessage $message="tm-fold-tiddler" $param=<<foldme>> 
foldedState=<<folded-state2>> />
</$button>

<<folded-state>>
</$set>



On Saturday, August 5, 2017 at 12:07:12 PM UTC-7, ste...@gmail.com wrote:
>
> Hi,
>
> I'm trying to generate new tiddlers using the action-createtiddler widget 
> and fold them immediately with "tm-fold-tiddler". However, the folding 
> doesn't seem to work. This is my code, which I want to use to import 
> individual posts ("toots") from the social network Mastodon:
>
> \define folded-state2()
> $:/state/folded/$(foldme)$
> \end
>
> <$edit-text tiddler="$:/temp/mytoot" tag="input" field="titel" 
> default="Toot Title" size=30/>
>
>
> <br />
> <$edit-text tiddler="$:/temp/mytoot" tag="textarea" class="editorArea" 
> default="json toot"/>
>
> <$set name="foldme" value={{$:/temp/mytoot!!titel}}>
> <$button>
> <$action-createtiddler $basetitle={{$:/temp/mytoot!!titel}} tags="Toots" 
> type="application/json" $savetitle="!!toot-titel" text={{$:/temp/mytoot}}/>
> Save json toot
> <$action-sendmessage $message="tm-fold-tiddler" $param=<<foldme>> 
> foldedState=<<folded-state2>> />
> </$button>
> </$set>
>
> What am I doing wrong?
>
> Many thanks,
>
> Stef
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
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/ecfb30b7-4f62-4636-ba5d-a57d697c4f64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to