Maybe instead of whatever the linkcatcher is suppose to do (sure would be 
nice if someone completed it's documentation with an example or two), maybe 
generate a list of pop-up buttons. Like:

\define choose_spell(field:nofield tags:"")
<$button popup="$:/listpop">Pop up list</$button>

<$reveal type="popup" state="$:/listpop">
<$list filter="[tag[$tags$]]">
<div class="tc-dropdown-item">
<$button set="!!$field$" setTo="YES"><$view field="title"/></$button>
</div>
</$list>

</$reveal>

\end

<<choose_spell "stuff" "HelloThere">>


In your example, I couldn't figure out what you wanted set to what. So 
these buttons just put a text value "YES" in the "stuff" field of the 
tiddler that is clicked on. If you want the generated buttons to look like 
links, I think you just add some classes to them.

In your example you were using {{##myfield}} at the bottom which I didn't 
understand because ## is text reference to a data dictionary entry. You 
can't be referring to a data dictionary (AFAIK) that is the same tiddler 
that you are currently in. So ... are you trying to pull from a data 
dictionary somewhere?

Good luck!
Mark



On Friday, July 14, 2017 at 7:10:19 PM UTC-7, [email protected] wrote:
>
> I am attempting to create a button that, when clicked, pops up a <$list> 
> of tiddlers w/ a specified set of tags.
> on clicking a list item, it sets a field/index in the specified tiddler.
>
> This is a for a spell sheet template for a dnd campaign notebook i am 
> making.
>
> I was attemping to adapt from Tobias' popup macros, but i am butchering it 
> terribly.
>
> Can someone clue me in on what i'm doing wrong?
>
> \define choose_spell(field:nofield tags:"")
> <$set name="state" value=<<qualify """$:/state/pop-$field$""">>>
> <$button popup=<<state>> class="pop-btn" 
> selectedClass="pop-btn-selected">$field$</$button><$reveal type="popup" 
> state=<<state>> class="tc-popup pop-popup" set="$(title)$">
> <div class="tc-block-dropdown">
> <$linkcatcher  setTo="$field$">
> <div class="tc-dropdown-item">
> <$list filter="[tag[Spell]$(tags)$]">
> <$link to=<<state>> >{{##title}}</$link>
> </$list>
> </div>
> </$linkcatcher>
> </div>
> </$reveal>
> </$set>
> \end
>
> <span>
>
>   {{##myfield}} <<choose_spell myfield "Spell Level/0 [Class Paladin]">>
>
> </span>
>
>

-- 
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/49aea43e-3a68-4d85-9c81-26eb66d196c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to