Hi Tobias

The $fieldmangler widget was introduced early on in the development of TW5 
-- at the time (I presume) it was the only way of manipulating tags and 
fields -- it performs an essential part of the core functionality of TW5.

I developed the $mangletags and $setfield widgets as more versatile 
replacements for the $fieldmangler widget. The new $action-setfield has in 
turn rendered much of the functionality of my $setfield widget redundant.

I would prefer a more versatile replacement for the $fieldmangler widget, 
but this would necessitate numerous edits to the core functionality of TW5. 
Perhaps, in the interim, it would be easier to include a widget in the core 
along the lines of my new $action-mangletags widget. I will publish soon, 
but I wish to first test this out in usage, as I made several changes to 
the $mangletags code (my $mangletags widget contained a logic error for 
several iterations after I first published.)

I have attached a beta version for testing purposes.

regards

On Tuesday, 22 September 2015 09:54:23 UTC+2, Tobias Beer wrote:
>
> Hi Metabele / @Jeremy,
>
> I would have hoped that with the messages we won't need *$mangletags* 
> anymore, but I guess putting the fieldmangler inside a button won't work...
>
> Find Tag:
> <span title="Select a Tag to Find">
> <$select tiddler="$:/temp/find" field="text" default='(none)'>
> <option value="null">(none)</option>
> <$list filter="[all[tiddlers]tags[]sort[title]]">
> <option value=<<currentTiddler>>><$view field="title"/></option>
> </$list>
> </$select>
> </span>
>
> Replace With: <$edit-text tiddler="$:/temp/add"  tag="input" type="text" 
> placeholder="Add Me" />
>
> <$button>
> <$list filter="[tag{$:/temp/find}]">
> <$fieldmangler tiddler=<<currentTiddler>>>
> <$action-sendmessage message="tm-add-tag" param={{$:/temp/add}}/>
> <$action-sendmessage message="tm-remove-tag" param={{$:/temp/add}}/>
> </$fieldmangler>
> </$list>
> <$action-setfield $tiddler={{$:/temp/find}} title={{$:/temp/add}}/>
> <$action-deletetiddler $tiddler={{$:/temp/find}}/>
> <$action-sendmessage $message="tm-close-tiddler" $param={{$:/temp/find}}/>
> replace
> </$button>
>
>
> |!search <$link to={{$:/temp/find}}><$view tiddler={{$:/temp/find}} 
> field="title"/></$link>|!replace <$link to={{$:/temp/add}}><$view 
> tiddler={{$:/temp/add}} field="title"/></$link>|
> |<<list-links [tag{$:/temp/find}]>>|<<list-links [tag{$:/temp/add}]>>|
>
> What makes the fieldmangler necessary anyway?
>
> 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/ef2c86c3-1eab-48de-afee-fb84694f350a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: action-mangletags.tid
Description: Binary data

Reply via email to