"class=--" tiddlers

113 views
Skip to first unread message

A Gloom

unread,
Jun 25, 2019, 11:48:03 PM6/25/19
to TiddlyWiki
(with single file TW 5.1.17, latest FF)

If you see tiddlers starting with "class=--" followed by numbers-- they seem to be created by tabs macros that don't have a state tiddler defined-- yes, I was sloppy with the coding.  They will appear in the list of the "Recent" tab and their text field will contain the title of a tiddler selected by the tabs macro.

These tiddlers are normal tiddlers (a non shadow tiddler in its tiddler "Info", "Advanced" tab), will appear in the "Recent" tab, in the "More" tab, "All" section, and will appear in search results for "class=--" in the normal search bar.

The "class" of the title possibly comes from the tabs macro-- one of its parameters is "class".

I've had other similarly named unknown tiddlers -- like "details=--" appear, all having the same "=--" section and I assume they're created by macros where I didn't properly set a state parameter.

If you have multiple tab macros in your TW, be sure to use unique state tiddler names for each (see below) or they will share the same state and one tab macro will show the seelected tab from a previously used tab macro

If you want to keep track of the names you use for state tiddlers the "More" tab, "Explorer" section, "state/" folder lists all state tiddlers.  "$:/state/tab--" tiddlers also seem to be created by tab macros with no unique state tiddler declared.

Or you can use the filter expression in "Advanced Search":

[prefix[$:/state]!prefix[$:/state/edit]!prefix[$:/state/folded]!prefix[$:/state/toc]!prefix[$:/state/tree]]

Or in a tiddler, use this list which will also display the "text" fields of each tab state tiddler

<$list filter="[prefix[$:/state]!prefix[$:/state/edit]!prefix[$:/state/folded]!prefix[$:/state/toc]!prefix[$:/state/tree]]">
<$link><$view field="title"/></$link> -- <$view field="text"/><br/>
</$list>

quirks of the tabs macro (covered by an older thread)

if you use "tc-vertical"/class="tc-vertical" instead of the default horizontal tabs which don't need any declaration, there's particular ways to do it, where it had to be the fourth "" parameter (parameter names not needed)-- ie you must have 3 sets of "" (filled or empty) before it

<<tabs "tabList" "$:/state/tabsuniquesuffix" "_default tab name_" "tc-vertical">>
<<tabs "tabList" "$:/state/tabsuniquesuffix" "" "tc-vertical">>

these don't work, the tab macro will work but not display vertically
<<tabs "tabList" "_state tiddler title_" "tc-vertical">>
<<tabs "tabList" "_default tab name_" "tc-vertical">>

amusingly these typos worked
<<tabs "tabList" "_state tiddler title_" ""tc-vertical>>
<<tabs "tabList" "_state tiddler title_" ;;"tc-vertical">>
<<tabs "tabList" "_state tiddler title_" ""tc-vertical">>

TonyM

unread,
Jun 26, 2019, 12:27:13 AM6/26/19
to TiddlyWiki
A

Have you tried the qualify macro?

<<qualify "$:/tabstate">> to get a tiddler unique tile for the state tiddler

Tony

A Gloom

unread,
Jun 26, 2019, 2:45:19 AM6/26/19
to TiddlyWiki
Tony,

Have you tried the qualify macro?

<<qualify "$:/tabstate">> to get a tiddler unique tile for the state tiddler


No I haven't-- haven't done much with the quality macro (I am John Snow-- so much I still don't know) but thank you kindly for the suggestion, I shall look into it.

A Gloom

unread,
Jun 26, 2019, 10:22:18 PM6/26/19
to TiddlyWiki
Attaching .tid file for TWScripts
class=-- tiddlers.tid

TonyM

unread,
Jun 26, 2019, 10:49:29 PM6/26/19
to TiddlyWiki
Expanded macrocall version of tabs macro

<$macrocall $name=tabs 
tabsList="filter to include tabs" 
default="Default tiddler title" 
state="$:/state tiddler name"
class="one or more classes" 
[template="Used to transclude the content of each tab"]
[buttonTemplate="for transcluding the content of the button for the selected tab"]
[retain="yes"]/>
Items in [are optional]

Set state as follows to retain for the current tiddler only
state=<<qualify $:/tabstate>>

Uses $:/tabstate--1307103205 as the state tiddler in my tiddler, unique for each tiddler, changes if tiddler renamed.

Regards
Tony


A Gloom

unread,
Jun 27, 2019, 1:22:48 AM6/27/19
to TiddlyWiki
Tony

Thank you-- the macrocall is the standard one just fully detailed?

Your link timed out-- was it to what handled the uniqye titles or is it created by qualitty and I need not worry about it?

TonyM

unread,
Jun 27, 2019, 2:47:48 AM6/27/19
to TiddlyWiki
Oops

Sorry it was not supposed to be a link.

If you mouse over it you may see the link is to something on my network

Regards
Tony

A Gloom

unread,
Sep 24, 2019, 3:41:03 AM9/24/19
to TiddlyWiki
If you see tiddlers starting with "class=--" followed by numbers-- they seem to be created by tabs macros that don't have a state tiddler defined-- yes, I was sloppy with the coding.  They will appear in the list of the "Recent" tab and their text field will contain the title of a tiddler selected by the tabs macro.

__ANSWER__:

Improper tabs macro syntax.

1) Omitting values in the macro

see further below

2) Improper syntax for a macro value

class='tc-vertical" was used instead of just a value ("tc-vertical") so along with the values omission, "class=" was attempted to be used as a state tiddler name by the tabs macro.
 
if you use "tc-vertical"/class="tc-vertical" instead of the default horizontal tabs which don't need any declaration, there's particular ways to do it, where it had to be the fourth "" parameter (parameter names not needed)-- ie you must have 3 sets of "" (filled or empty) before it

__REASON__:

Omitting values in a macro call:

The tabs macro definition: `\define tabsaltlabelref(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain)`

When a name is listed in a macro, it must have a value defined in its place even if its an empty value ("") if any further values follow after it in a macro call. &nbsp;Otherwise the value after an omitted value takes the omitted values place and won't make sense to the macro and won't be applied or break the macro.

ie: Omitting the proper state value makes the class (tc-vertical) value take its place and the macro will try to use it for a state tiddler name. &nbsp;Any values after your last desired value for a macro can be omitted in most cases, but not ones in between.
 
Reply all
Reply to author
Forward
0 new messages