Thanks Eric,

This not only allows me to use my variable names but your internal 
variables stay the same so no modifications at all, as you say. This is a 
particularly useful solution when the widget or macro concerned is packed 
with functionality, which is forced upon us through the combining the 
edit-text and filtered selections. Personally I may use <<edit-fieldname>> 
rather than <<edit-list-vars>>  and I may even create other macros to use 
the edit-list macro features where many of the parameters are already set. 
In many ways this is layers of abstraction, and simplification, while 
maintaining maximum features.

Now some speculation

Looking at your example it makes me ask if perhaps a special case operator 
would be nice 
Rather than [[$id$]!is[blank]else<id>!is[blank]else[]]
perhaps [case[$id$,<id>] where the first non blank value is used or nothing 
at all.
or [case[$id$,<id>,{!!id},{id},2] where the first non blank value is used 
or 2 (because it will always provide a value ie 2 is the default).

Or alternatively the match could allow parameters 
match[$id$,<id>,{!!id},{id}]

Because the truth is there are many cases where the first non-blank value 
is what we are after.

I think the operator parameters demand this following format.

eg filters such as 
[{$:/config/name}case[yes]]
[{$:/config/name}case[yes],[no],[maybe]]  as a valid parameter test

Allowing a full "case" statement;

<$list filter="[<business-size>case[small],[medium],[large]]" variable=case>
   <$list filter="[<case>match[small]]">

  </$list>
   <$list filter="[<case>match[medium]]">

  </$list>
   <$list filter="[<case>match[large]]">

  </$list>
</$list>


Tones


On Tuesday, 27 July 2021 at 08:58:19 UTC+10 Eric Shulman wrote:

> On Monday, July 26, 2021 at 7:40:48 AM UTC-7 Eric Shulman wrote:
>
>> OK... so I thought of a really neat way to achieve your goal *without 
>> modifying my macro!*
>
>
> Tony,
>
> I've just added this method of using variables vs. parameters as an 
> alternative macro definition:
>
> https://tiddlytools.com/edit-list.html#TiddlyTools%2FMacros%2Fedit-list-vars
>
> which is invoked using: <<edit-list-vars>>
>
> Of course, you will still need to have the underlying macro definition as 
> well:
> https://tiddlytools.com/edit-list.html#TiddlyTools%2FMacros%2Fedit-list
>
> See Notes in 
> https://tiddlytools.com/edit-list.html#TiddlyTools%2FMacros%2Fedit-list%2FInfo
> for more details regarding usage.
>
> enjoy,
> -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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/076adf04-7c91-44e9-8878-da94284ddba2n%40googlegroups.com.

Reply via email to