[TW5] Will state likes tab-1749438307 change in the future?

42 views
Skip to first unread message

LinOnetwo

unread,
May 1, 2019, 12:04:58 PM5/1/19
to tiddly...@googlegroups.com
How do you know state is inside $:/state/tab-1749438307?
Will this value change in the future?

Mat

unread,
May 1, 2019, 5:57:35 PM5/1/19
to TiddlyWikiDev
The random title of the state tiddler is because the tiddler must have some name... and if the title is man made, it risks not being unique, so instead it is a randomized title.

I made this thing as a tool to have some control of tabs for this reason. 

<:-)


LinOnetwo

unread,
May 1, 2019, 11:42:58 PM5/1/19
to TiddlyWikiDev
Thanks for sharing!

Simon Huber

unread,
May 2, 2019, 4:35:42 AM5/2/19
to TiddlyWikiDev
Hello @LinOneTwo,

in the tiddlywiki core these state titles are generated by the <<qualify>> macro or <$qualify/> widget. they use a mechanism that creates a hash string based on the "transclusion variables" found through walking up the widget tree (which is something like an analogue to the html tree, but built starting with the rootwidget "at the top" [see $:/core/modules/rootwidget.js])

such a state title will not always reliably be the same

there's a discussion over at the github repo where I've posted some hacks that allow remodelling of the state at any position in the DOM, but it's a bit complicated

best wishes,
Simon

@TiddlyTweeter

unread,
May 2, 2019, 7:27:32 AM5/2/19
to TiddlyWikiDev
Very interesting issue.

I'm not so tech but noticed the "hash" address is pretty reliably consistent in many cases. 

I like I can let the system work it out and do the state name for me. 

IF I need exact human readable state addresses then mostly it seems it can be asserted?

Just a footnote
Josiah
Reply all
Reply to author
Forward
0 new messages