On Thursday, September 1, 2016 at 5:01:57 PM UTC+2, Danielo Rodríguez wrote:
>
> I want to create a button that opens the info toolbar on certain tab. 
> Sadly, due to the following characteristic of the qualify macro:
>

I did publish a tiddlywiki at wikilabs.github.io 

It contains the functionality that I demoed at the eu-meetup. It is a very 
opinionated "beta" editon, that contains some of my TW modifications. I did 
try to make them as "generic" as possible. see: https://github.com/wikilabs 
themes, plugins, editions repos for more info. 


It returns a unique string that encodes its position within the widget tree 
>> <http://tiddlywiki.com/#Widgets>, 
>
>
> I can't target the same state tiddler from outside the info panel . So, 
> the same qualify widget <<qualify "$:/state/tab">> returns two different 
> things depending from where it is being called.
>

As you found out the <<qualify ...>> macro creates (for humans) 
unpredictable state names. So if you want to set a state from "somewhere" 
you'll need a dynamically created, but predictable name. I did this with my 
tag pills.

So if you click a tag pill, it will open the tiddler info section and the 
corresponding "Tag Map" 
<https://wikilabs.github.io/#%24%3A%2Fplugins%2Fwikilabs%2Finfo-tagmap> 
tab. 

For this behaviour you'll need some major changes to some ViewTemplate 
elements. 

This link 
<https://wikilabs.github.io/#GettingStarted:GettingStarted%2001-slant-01-theme%20%24%3A%2Fwikilabs%2Fmacros%2Ftabs-state%20%24%3A%2Fcore%2Fui%2FTiddlerInfo%20%24%3A%2Fcore%2Fui%2FViewTemplate%20%24%3A%2Fcore%2Fui%2FTagTemplate>,
 
will open the different tiddlers, that are involved, to provide the needed 
functionality. 

 - 01-slant-01-theme ... is a theme that can be selected. So you can enable 
/ disable the functions with the default theme switcher.

 - $:/wikilabs/macros/tabs-state .. is a modified tabs macro, that allows 
you to set the selected tab from outside

 - $:/core/ui/TiddlerInfo ... calls the above tab-state macro

 - $:/core/ui/ViewTemplate ... contains 2 new variable definitions for 
"tiddlerInfoState". *see the first 2 \define* statements

 - $:/core/ui/TagTemplate ... contains the buttons to activate the stuff. 
\define 
tag-body-inner() contains 2 <$action-setfield widgets that activate the 
info area and select the right tab. 

if you have questions, just ask.

have fun!
mario


-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/93fdbe39-78e5-4d97-bc63-b4d5eb7effb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to