Hi Mans

Exercise caution when using the 'set=' and 'setTo=' attributes of the 
<$button> and <$maketid> widgets in the same way as in the <$setfield> 
widgets. The former do not target the value for the target propagated with 
the 'param=' attribute by default, and in some circumstances will, 
therefore, target a different tiddler. 

regards

On Thursday, May 29, 2014 9:55:15 PM UTC+2, Måns wrote:
>
> Hi Matabele
>
> You solved all my problems - Thank you very much :-)
>
> 1) Setting states to fields in current tiddler lets me have individual 
> control with the state of every button in every individual tiddler.
>
>
>
> 2) Your setfield widget makes it possible to set all fields at once.
> My quiz consists of buttons which reveals words when you click on them.
> Now it's possible to open all at once or close all at once :-) GREAT!!
>
> I changed your demo-button and put it in my "song-skeleton/template" like 
> this:
>
> <$reveal type="nomatch" state="!!state1" state="!!state2" state="!!state3" 
> state="!!state4" state="!!state5" state="!!state6" text="show">
> <$setfield set="!!state6" setTo="show">
> <$setfield set="!!state5" setTo="show">
> <$setfield set="!!state4" setTo="show">
> <$setfield set="!!state3" setTo="show">
> <$setfield set="!!state2" setTo="show">
> <$button  set="!!state1" setTo="show" message="tw-set-field">Show all 
> words</$button></$setfield></$setfield></$setfield></$setfield></$setfield>
> </$reveal>
> <$reveal type="match" state="!!state1" state="!!state2" state="!!state3" 
> state="!!state4" state="!!state5" state="!!state6" text="show">
> <$setfield set="!!state6" setTo="hide">
> <$setfield set="!!state5" setTo="hide">
> <$setfield set="!!state4" setTo="hide">
> <$setfield set="!!state3" setTo="hide">
> <$setfield set="!!state2" setTo="hide">
> <$button set="!!state1" setTo="hide" message="tw-set-field">Hide all 
> words</$button></$setfield></$setfield></$setfield></$setfield></$setfield>
> </$reveal>
>
>
> It was basically a trial/error process on my part - don't know if it could 
> have been written with less code? Point is: IT WORKS :-)
>
> Thank you again Matabele - You saved my day :-)
>
> Cheers Måns Mårtensson
>
>
>

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

Reply via email to