Query: Is a "$:/state/..." Tiddler simply a temporary tiddler?

92 views
Skip to first unread message

@TiddlyTweeter

unread,
Aug 14, 2017, 6:18:53 AM8/14/17
to TiddlyWiki
Simple queries by an idiot ...

Are Tiddlers named "$:/state/..." simply the TW equivalent of "Temp" files that can be safely deleted?

That's the easy part.
  • I assume you could, in theory, call anything a "$:/state/anything" even if it were not be used for temporary data holding?

  • And you COULD, in theory, call a state tiddler "$:/not-a-state/confusion"?
Just trying to get a bit clearer.

Best wishes
Josiah

PMario

unread,
Aug 14, 2017, 6:37:10 AM8/14/17
to TiddlyWiki
On Monday, August 14, 2017 at 12:18:53 PM UTC+2, @TiddlyTweeter wrote:
Are Tiddlers named "$:/state/..." simply the TW equivalent of "Temp" files that can be safely deleted?

partially right: ... state tiddlers are seved but $:/temp/... tiddlers are __not saved__

As the name says, "$:/state/..." tiddlers contain the TW state. eg: "which tab is selected" by the <<tabs ...>> macro, and so on.
If you want to reset your TW to the initial state of eg: empty.html you can safely delete them.

I even did create a plugin, to get rid of them. ... I need this plugin while developing stuff, to reset to a "well-defined" state ...
 

That's the easy part.
  • I assume you could, in theory, call anything a "$:/state/anything" even if it were not be used for temporary data holding?
right. ... you can name your tiddlers as you like. .. _but_ it may confuse you and your users in the future and will cost you a lot of time and money supporting your "mis-named" tiddlers. ... Nothing more to say ;)

  • And you COULD, in theory, call a state tiddler "$:/not-a-state/confusion"?
yea. ... see above

Naming tiddlers right is hard, if you don't want to create conflicting names. ... That's why there are some "best practices" in place.

eg: naming conventions for plugin authors: $:/plugins/<author>/<plugin-name>/<tiddler-name> see my plugin above.

or a list of names used by the core: http://tiddlywiki.com/#Naming%20of%20System%20Tiddlers

have fun!
mario



@TiddlyTweeter

unread,
Aug 14, 2017, 6:59:41 AM8/14/17
to TiddlyWiki
PMario wrote:
 ... state tiddlers are seved but $:/temp/... tiddlers are __not saved__

As the name says, "$:/state/..." tiddlers contain the TW state. eg: "which tab is selected" by the <<tabs ...>> macro, and so on.


Right. BUT ALSO they seem used a LOT not JUST to register configuration states but also in macros to hold data temporarily. For instance, you are making a Tiddler tweetable the content is passed to a "state" Tiddler to enable handling for later steps. IF that data THEN persists AFTER you have finished it seems odd to me.

Is "state" being used where "temp" would be more appropriate? 

Best wishes
Josiah

PMario

unread,
Aug 14, 2017, 7:16:08 AM8/14/17
to TiddlyWiki
On Monday, August 14, 2017 at 12:59:41 PM UTC+2, @TiddlyTweeter wrote:
Right. BUT ALSO they seem used a LOT not JUST to register configuration states but also in macros to hold data temporarily. For instance, you are making a Tiddler tweetable the content is passed to a "state" Tiddler to enable handling for later steps.

I'm 100% sure that I don't create content that can be tweeted. 140 chars are not enough for me ;) ... just joking.
 
IF that data THEN persists AFTER you have finished it seems odd to me.

Is "state" being used where "temp" would be more appropriate? 

Hmmm, .. It depends ... on the plugin authors intentions. It may be an oversight or a bug.

-m

@TiddlyTweeter

unread,
Aug 14, 2017, 7:46:22 AM8/14/17
to TiddlyWiki
PMario wrote:
I'm 100% sure that I don't create content that can be tweeted. 140 chars are not enough for me ;)

that was only 97 characters. you may be underestimating your Tweeting skills.

Just saying
Josiah, x
Reply all
Reply to author
Forward
0 new messages