Calling Procedures - I have to be missing something!

Okay, I was previously having issues calling procedures from procedures and the like. But during the course of my troubleshooting, taking it all the way back to basic functionality, I still can’t seem to get it to work right, and I don’t know why. Something about it is slipping out of my brain and making my eyes cross. First off, you can actually see the current result in my static site that is hosted at TW-Skrypt — Development wiki for TW-Skrypt. I tried to put as much detail as I could on the first post there, but here goes. I have a procedure that takes two variables (both strings). It is contained within a shadow tiddler for my future plugin. I even tried it with a new empty version in case somehow Kookma was messing things up.

My procedure is this:

\procedure skrypt-label(label, tooltip)
<span class="skrypt-field-label">
  <<label>>  
  <$list filter="[<tooltip>!is[blank]]">
    <span class="skrypt-tooltip-container" style="background-color:<<colour sidebar-tab-background>>; color:<<colour foreground>>">
      <span class="skrypt-tooltip-content">
        <<tooltip>>
      </span>
    </span>
  </$list>
</span>

\end

When I call the procedure from in this tiddler, it works as expected with basic strings (screenshot with preview mode - and the tooltips work fine).

And when I call it from anywhere else, any other way, I get nothing. I haven’t even gotten to the variable usage yet, but I need to figure out what I’m missing here. It’s not complicated, I’m sure. I’m guessing it’s a whitespace thing somewhere, but all of my looking through documentation does not seem to matter here.

I even tried a lot of ways (which is a sign of desperation on my part).

<<skrypt-label label:"HelloLabel" tooltip:"label Tooltip">>
<<skrypt-label label:'HelloLabel' tooltip:'label Tooltip'>>
<<skrypt-label label="HelloLabel" tooltip="label Tooltip">>
<<skrypt-label label='HelloLabel' tooltip='label Tooltip'>>
<$transclude $variable="skrypt-label" label="I am a label!" tooltip="look a tooltip" />
<$transclude $variable='skrypt-label' label='I am a label!' tooltip='look a tooltip' />

Thanks in advance, and I really wish that my first issue to post here was something complicated I’ll be doing later, but such is life.

You need to explicilty make the procedure available globally:
https://tiddlywiki.com/#SystemTag%3A%20%24%3A%2Ftags%2FGlobal

1 Like

I knew it was something stupid I missed. THANK YOU! Good to know for the future. I’m guessing that particular part was why I had so many issues handling the nested stuff that also happened to exist in shadow tiddlers. That means I’m probably going to have a beta sooner than expected!