Hi Stephan

The reason why these examples don't work is because the "state" attribute
isn't specified.

<$reveal type="match" default="def" text="def">
match<br/>
</$reveal>
<$reveal type="nomatch" default="def" text="def">
nomatch<br/>
</$reveal>

Best wishes

Jeremy.


On Sun, Nov 23, 2014 at 8:00 PM, Stephan Hradek <stephan.hra...@gmail.com>
wrote:

>
>
> Am Sonntag, 23. November 2014 20:49:01 UTC+1 schrieb Tobias Beer:
>
>     I see the if else exercise did have it's fruits. :)
>     Best wishes, Tobias.
>
> So it is. With the default you could easily create your comparison with
> different values:
>
> <$reveal type="match" text="$foo$" default="myValue">
> do this
> </$reveal>
>
>
>
> And maybe an idea for after the end of the moratorium: "Poor man's switch":
>
> <!-- 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>
>
>
>
>
> This would also solve the annoying fact that you often have to have 2
> reveals with contrary types but same test, just to get the "else" part:
>
> <!-- 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 tiddlywikidev+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywikidev@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to