Hi,

I came across something strange in relation with the setWidget, when used 
with a filter in order to affect a value to a variable (the value= ... 
emptyValue=... syntax)
It seems that I can't affect an empty string as value although I can do it 
with emptyValue.

Try the following code in a tiddler :

\define myFilter1() "something"
\define myFilter2() ""

<$set name="foo" filter=<<myFilter1>> value="" emptyValue="value if empty">
 foo: <<foo>>
</$set>


<$set name="bar" filter=<<myFilter2>> value="value if not empty" 
emptyValue="">
 bar: <<bar>>
</$set>


In the first case the value stored in foo is the value of the filter : 
something, while I was expecting an empty string.
In the second case, bar is an empty string as requested.

I must admit it's a very narrow use-case, but I don't know if this 
behaviour is expectet or not so I prefer to just pass the info.

FrD


 

-- 
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/71cf8240-090e-47eb-9aec-20723e65840c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to