On Monday, February 10, 2020 at 3:07:06 PM UTC+1, Mohammad wrote: > > > On Monday, February 10, 2020 at 5:12:04 PM UTC+3:30, PMario wrote: > ..... > I know it's not a real solution for your request but anyway: >> >> I did create a PR at github >> <https://github.com/Jermolene/TiddlyWiki5/pull/4454>, that allows the >> qualify-macro to use a isUnique parameter. So you can use >> <<qualify "my-unique-title" isUnique:"yes">> .. So the macro doesn't add >> -123456 string. It returns the input state text. >> >> > > Are these unique permanent state or will be changed from session to > another session or different position of host tiddler in the widget tree? >
It basically is a "title-pass-through". So the user has to make the title unique. ... The advantage is, that there is a new parameter isUnique Eg: the core tabs macro uses the <<qualify "$state$">> in the macro code. .. The problem now is, that as a developer I need to change the core tabs macro if I don't want the default behaviour of the qualify macro. ... If you have a look at the PR, I also changed the core tabs macro like so: <<qualify "$state$" "$isUnique$">> .. and the tabs macro gets a new parameter isUnique too. .. So no need to change the core tabs macro anymore, just to give it a state with a different behaviour. ..... > My use case is to put some table properties created interactively by user > when Shiraz dynamic table is used. Each table uses a state tiddler like > $:/keepstate/dtable/xxx/xxxx/??? > so, one time is created I do not need to explicitly refer to it! > > I cannot use variable or fields here, as I do not know how many tables a > user created per tiddler. > *Can you provide a link to some of your state creation tiddler and some code that uses those macros? *.. I have no idea what Shiraz tables do and how they are created. The qualify macro code has a "hidden feature" that isn't exposed to wiki users. ... It creates the unique hash based on the "transclusion" variable in the widget tree. ... transclusion is the default variable name defined by the code <https://github.com/Jermolene/TiddlyWiki5/blob/04c28ba5f23dc62c0be68c45e403fb7ebd497984/core/modules/widgets/widget.js#L240>. This variable name could be assigned by users, but the qualify macro doesn't use this name atm. .. I did experiment, if it could be used to create predictable unique states. ... BUT the mechanism only creates headaches. -m -- 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/a6ded49c-677e-4e38-85ac-985a4216a0e8%40googlegroups.com.

