Yeah! You are fully right! I should test and debug an example before 
posting it :-/
I really appreciate your time, and I'm sorry that you had to sort out my 
mistakes (first three of your notes). 
But without that I would not get your cool advises (the other three ones). 
All of them are useful for me! Thanks!
Especially THIS looks much more optimal and beautiful comparing to mine, so 
i take it: 
<$list filter='[{$:/hb/Scrollable!!text}prefix[yes]]'>
понедельник, 12 октября 2020 г. в 13:54:17 UTC+6, Eric Shulman: 

> On Monday, October 12, 2020 at 12:17:40 AM UTC-7, Shareda wrote:
>>
>> TW Tones, here is an example code from UI preferences:
>> <$reveal type="match" state="$:/hb/Scrollable" text="yes">
>>   <$edit-text tiddler="$:/hb/CiteDivHeight" 
>> default="600" size="1" rows="1" autoHeight="no"tag=input/> <$range 
>> tiddler="$:/hb/CiteDivHeight" min="300" max="999" 
>> default="600" increment="10" tooltip='300-999px'/>
>> </$reveal>
>> Instead of this I can use List like <$list 
>> filter='[all[$:/hb/Scrollable]get[text]prefix[yes]]'> 
>> and so on.
>>
>
> Just a few notes about the example $list you posted:
>
> The all[...] operator takes one or more *keywords* (current, missing, 
> orphans, shadows, tags, tiddlers) as a parameter, not a tiddler title.
> To specify a literal tiddler title, use title[TiddlerName] or just 
> [TiddlerName], like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]'>
>
> In place of the combination of [TiddlerName]get[text], you could write 
> {TiddlerName!!text}, like this:
> <$list filter='[{$:/hb/Scrollable!!text}prefix[yes]]'>
>
> By default, the $list widget sets "currentTiddler" within the body of the 
> <$list>...</$list>.
> Thus, in your example code, the value of <<currentTiddler>> within the 
> $list body will be "yes".
>
> To leave the value of currentTiddler unchanged, you must specify an 
> alternative variable name, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]' 
> variable="something">
>
> As an alternative, you could also preserve the value currentTiddler by 
> adding "then<currentTiddler>" at the end of your test, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]then<currentTiddler>
> ]'>
>
> Of course, if you don't use the result within the body of the $filter (as 
> in your example, which explicitly specifies tiddler="$:/hb/CiteDivHeight"), 
> then you can omit the variable="..." syntax entirely.
> Even so, it's a good convention to use a variable whenever the $list is 
> just being used as a conditional test. I like to use a name that describes 
> the purpose of the test, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]' 
> variable="if_scrollable_flag_is_set">
>
> 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/4c48eaa2-728b-4907-ab4f-e3848c592d65n%40googlegroups.com.

Reply via email to