Hi Mans On Saturday, May 31, 2014 2:27:24 PM UTC+2, Måns wrote: > > > As I understand it the maketid widget creates the tiddler if it doesn't > exist already - and appends the specified field and fieldvalue at the same > time.. >
No -- the new tiddler gets created from the template with the title and tags specified (these two fields write over the 'title' and 'tags' fields of the template before it is created.) The setting of the value of the text-reference is done separately and may be subject to the vagaries of timing (presently the new tiddler appears to be created before the value of the text-reference is set.) This can be seen since the target of the set and setTo attributes may differ from the newly created tiddler. > If the tiddler doesn't exist already the maketid widget and set field > widget will write fields & values to the existing tiddler, however the > maketid will also create a new tiddler with a numbered appendix to the > title - and this tiddler won't get fields & values set by the widgets... > Again, not quite correct. The message parameter generated by the <$maketid> widget will be the same as the title of the new tiddler (even if a new name is generated in the case that the title specified already exists) -- all of the <$setfield> widgets will, therefore, target the newly created tiddler. The set and setTo attributes of the <$button> and <$maketid> widgets, however differ -- they target 'currentTiddler'. In the case that the target specified for these attributes is the same as the new title, all will be well provided that there is no existing tiddler with that title. If there is, the <$maketid> widget will change the title and create a new tiddler with a different name without changing 'currentTiddler'. I can not change the behaviour of the <$button> widget, and by choice I chose to mirror this behaviour in the <$maketid> widget. This could be changed -- or the set and setTo attributes of the <$maketid> widget could be removed entirely (after all, a <$setfield> widget is easily added.) In any case -- the best practice is to use only <$setfield> widgets if you intend to target the new tiddler -- use the set and setTo attributes of the <$button> and <$maketid> widgets for other purposes. regards -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

