On Thursday, December 24, 2015 at 10:47:24 AM UTC-8, Jeremy Ruston wrote:
>
> I’m keen to get 5.1.10 released early next week. Over the last few days 
> I’ve been catching up on pull requests and tidying up, as discussed in this 
> GitHub ticket:


with regard to this item:

* Extended the ActionSetFieldWidget to enable it to be used to delete a 
field or indexed property

Just to be clear.... with this change, if I write any of these
   <$action-setfield $tiddler="..." fieldname=""/>
   <$action-setfield $tiddler="..." $field="..." $value=""/>
   <$action-setfield $tiddler="..." $index="..." $value=""/>
it will not remove the field (or index) from the tiddler, but just set it 
to an empty string value.  However, if I completely omit the $value param, 
e.g.
   <$action-setfield $tiddler="..." $field="..."/>
   <$action-setfield $tiddler="..." $index="..."/>
it will completely remove the indicated field or index.

While this seems reasonable and convenient, some of this functionality 
(deleting a field) is already provided by
   <$action-deletefield $tiddler="..." $field="..."/>
What is needed to complete the picture is to extend $action-deletefield to 
support deleting an index:
   <$action-deletefield $tiddler="..." $index="..."/>

I've already made a modified version of the core widget definition for use 
in my InsideTiddlyWiki (ITW) project.  You can see the changed code here:
http://tiddlytools.github.io/InsideTW/#%24%3A%2Fcore%2Fmodules%2Fwidgets%2Faction-deletefield.js

I'm not set up to generate a proper pull request for the change, but I 
invite you to consider making these changes (all marked with /* ELS */) in 
addition to the extension to $action-setfield that you've already done. 
 It's almost certainly too late for inclusion in 5.1.10, but at least it 
can be added for 5.1.11

-e

-- 
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/1b1ec045-c3c9-46f4-8665-87cf5236f0ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to