defaultDefault value to use when the state tiddler is missing
<$reveal type="match" default="def" text="def">
match<br/>
</$reveal>
<$reveal type="nomatch" default="def" text="def">
nomatch<br/>
</$reveal>
<$reveal type="match" text="$foo$" default="myValue">
do this
</$reveal>
<!-- NOT ACTUAL CODE -->
<$switch>
<$reveal type="match" text="$foo$" default="myValue">
do this
<$break/>
</$reveal>
<$reveal type="match" text="$foo$" default="myOtherValue">
do this instead
<$break/>
</$reveal>
<!-- default -->
do something different
</$switch>
<!-- NOT ACTUAL CODE -->
<$switch>
<$reveal type="match" ...some comparrison here..>
do this
<$break/>
</$reveal>
<!-- default -->
otherwise do this
</$switch>
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.
Hi StephanThe reason why these examples don't work is because the "state" attribute isn't specified.
> Did you also consider the "poor man's switch"?
I think the logic is at the wrong layer.
The reveal widgets that are generated by the macro are redundant,
if(this.stateTitle) {
var state = this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler"));
var state = this.stateTitle
? this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler"))
: this["default"];
The reason why these examples don't work is because the "state" attribute isn't specified.
<$reveal type="match" state="" default="def" text="def">
match<br/>
</$reveal>
<$reveal type="nomatch" state=""
default="def" text="def">
nomatch<br/>
</$reveal>
Jeremy merged my pull request. So reveal can soon be used with variables too.
Jeremy merged my pull request. So reveal can soon be used with variables too.Which pull request was that?
<$reveal state=<<myVariable>> text="true">