On Monday, May 29, 2017 at 12:08:13 PM UTC+2, Ton Gerner wrote:
>
> @Julian
>
> Create a tiddler which contains:
>
> {{!!title}}
>
> {{!!draft.of}}
>
> {{!!draft.title}}
>
> In edit mode with preview mode enabled you see that `{{!!draft.of}}` and
> `{{!!draft.title}}` behave the same.
>
> But - still in edit mode - change the title of that tiddler. Only
> `{{!!draft.title}}` follows the change! Why?
>
That is exactly what I meant. draft.of contains the original title of the
tiddler that is being edited; i.e. the name the tiddler had when you click
the edit button, even if you change the title during editing. draft.title
contains
the title that the tiddler should get after editing. When you just pressed
the edit button, this coincides with draft.of, because you haven't changed
the title yet, but when you do, draft.title updates.
Now I am not that familiar with TiddlyWikis editing lifecycle internals,
yet, but I presume that both are needed at the moment you save the tiddler.
You want to be able to reference the original tiddler, for example to
potentially delete it when you changed the title, or to write the new
values of the draft tiddler back to it if you didn't. Also, if you changed
the title, you of course need to be able to reference that, to actually
create the new tiddler.
--
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 post to this group, send email to [email protected].
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/f0d9bb08-8c94-4d8d-8ed7-31efd5ca4e19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.