I confused about this!

By dirty saving does it mean sync on node.js or pushing the save button and 
create a single file?

I use a tiddler with $:/state prefix to keep the status of a $reveal widget 
between two sessions and I use node.js
When I reload the wiki, I see TW has deleted all $:/state tiddlers, so I 
cannot keep the status!


This is the code I used to reproduce the issue

<$reveal type=match state="$:/state/tid" text="show" defualt=show>
State is exist and its value is //show//
</$reveal>
<$reveal type=nomatch state="$:/state/tid" text="show" defualt=show>
State tiddler is not exist or its value is //hide//
</$reveal>

<$button>
<$list filter="[[$:/state/tid]get[text]match[show]]" emptyMessage="""Show 
<$action-setfield $tiddler="$:/state/tid" text="show"/>""">
Hide <$action-setfield $tiddler="$:/state/tid" text="hide"/>
</$list>
</$button>

On node.js TW seems delete $:/state tiddlers!

Thank in advance
Atronoush

On Thursday, January 9, 2020 at 8:00:58 AM UTC+3:30, Eric Shulman wrote:
>
> On Wednesday, January 8, 2020 at 7:57:42 PM UTC-8, Mohammad wrote:
>>
>> Tiddlywiki stores global variables in tiddler fields.
>> For example all state tiddlers in widgets like reveal, checkbox, 
>> edit-text, ...
>> Considering both single file wiki and Node.js wiki what are your 
>> recommendation in using
>>
>>    - $:/temp/mytiddlers
>>    - $:/state/mytiddlers
>>
>> Both $:/temp and $:/state are ignored when determining if the document is 
> "dirty" (see $:/core/SaverFilter)... and by default both are saved when you 
> save the file (except for $:/state/popup, which are NOT saved... see 
> $:/core/save/all)
>
> However, conceptually, $:/temp tiddlers should be "throw-away"... able to 
> be discarded when not actually in use, while $:/state tiddlers should 
> reasonably be expected to persist across sessions.
>
> To enforce this difference, I routinely create a tiddler, tagged with 
> $:/tags/Macro, containing:
> \define publishFilter() -[prefix[$:/temp]]
>
> This variable is automatically included by the $:/core/save/all filter.  
> The effect is that $:/temp tiddlers are NOT saved when you save the file 
> and are, in effect, automatically discarded at the end of the session.
>
> Thus, if I want a reveal state to always revert to closed on startup, I 
> will use a $:/temp tiddler, but if I want the reveal state to persist 
> across sessions, I will use a $:/state tiddler
>
> -e
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4f1edf71-eee7-4b10-b544-7e7fc020f7e6%40googlegroups.com.

Reply via email to