Discussion:
[tw] "tm-fold-tiddler" doesn't seem to work
(too old to reply)
s***@gmail.com
2017-08-05 19:07:12 UTC
Permalink
Raw Message
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:

<$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"/>


<$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={{$:/temp/mytoot!!titel}} $foldedStatePrefix="$:/state/folded/">
<$action-deletetiddler $tiddler="$:/temp/mytoot"/>
</$button>

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+***@googlegroups.com.
To post to this group, send email to ***@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/59359b78-44fb-4dd2-93ab-94705d4c1ca3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Mark S.' via TiddlyWiki
2017-08-05 20:21:31 UTC
Permalink
Raw Message
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>
Post by s***@gmail.com
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
\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+***@googlegroups.com.
To post to this group, send email to ***@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.
s***@gmail.com
2017-08-06 10:18:48 UTC
Permalink
Raw Message
Hi Mark,
Post by 'Mark S.' via TiddlyWiki
The documentation appears to be wrong. I put together code that seems to
work.
Thank you very much! Following your suggestion, I modified my code, and it
works fine now.

My code looks like this now:

\define folded-state2()
$:/state/folded/$(foldme)$
\end
<$edit-text tiddler="$:/temp/mytoot" tag="textarea" class="editorArea"
default="json toot"/>
<$edit-text tiddler="$:/temp/mytoot" tag="input" field="titel" default="Toot
Title" size=40/>
<$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>> />
<$action-deletetiddler $tiddler="$:/temp/mytoot"/>
</$button>
</$set>

For explanation: I wanted to hide the original JSON content of the
tiddlers, because I create formatted output with custom code from another
tiddler tagged $:/tags/ViewTemplate.

Thanks!

Cheers,

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+***@googlegroups.com.
To post to this group, send email to ***@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/2ea06d76-db1d-45f7-8342-a0dc5a733802%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...