Hi Tobias

The primary problem addressed by the $x-maketid widget is to do with the 
title of the new tiddler. A new tiddler requires a unique name, and this 
name gets generated only during the process of creating the new tiddler (by 
appending either a date/time stamp or an integer.) 

It is therefore impossible to write a button such as this with reliable 
results:

<$button>
<$action-sendmessage $message="tm-new-tiddler" title="My New Tiddler"/>
<$action-setfield tiddler="My New Tiddler" field1="one" field2="two" .../>
Create New Tiddler
</$button>

-- as the title of the new tiddler may not be 'My New Tiddler' (but may be 
something like 'My New Tiddler 1'.)

It is therefore necessary to set all of the values for the new tiddler 
either within the widget itself or via other widgets stacked around this 
widget which 'know' the title of the new tiddler. The $x-maketid widget 
gives multiple options for setting the title, tags and other field values 
and, where this proves insufficient, passes the name of the newly created 
tiddler via the parameter to a message to one or more $x-setrefs widgets, 
stacked around the $x-maketid widget.

The $x-maketid widget also allows for a new tiddler to be opened in edit 
mode (as for the tm-new-tiddler message), or created in the background (as 
for using an $action-setfield or set TextReference), or for navigating to 
the new tiddler in view mode.

The $x-maketid widget also provides for appending a date/time stamp to the 
title (in any specified format), for journal type tiddlers.

The $tags attribute of the widget allows for a subfilter to be applied to 
the list of tags copied from the template -- allowing tags to be 
added/removed/replaced etc.

These features together, allow for multiple similar tiddlers to be created 
reliably with successive clicks of the same button. This was a feature I 
required when populating folders for my version of GTD -- in this case, I 
wished to create a number of tiddlers in succession, the titles for which 
were contained in a list (in a data index.) 

Any other desired functionality can be easily added via additional 
attributes -- something that would be more difficult with the 
'tm-new-tiddler' method.

In general, I also find the action widget method more straightforward and 
more easily understood than methods based around widget messaging.

regards

On Tuesday, 10 November 2015 19:24:58 UTC+2, Tobias Beer wrote:
>
> Hi Matabele,
>
> As Jeremy says:
>  
>
>> I think people have successfully used the action-setfield widget to 
>> create new tiddlers silently. Not of course as flexible as Matabele’s 
>> widget.
>>
>
> Could you perhaps provide a quick overview of some of the features of or 
> implementations based on your maketid action widget you would find most 
> prominently missing as compared to using the core action-setfield?
>
> Best wishes,
>
> — tb
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d6ee47dd-7a37-4eea-a367-fcebe407950e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to