How can I close Displayed Attributes at once

This confirms the Show/Hide Displayed Attributes feature.
How can I close Displayed Attributes at onece, without using disclosure triangle?

Hopefully, closing the parent file will also close all the child files in the disclosure triangle
and close all the child triangles together?
Thx and regards, WAKAMATSU

The state of the diclosure triange is stored in system attribute $HideDisplayedAttributes and as described here.

There is also a shortcut to toggle visibility: [Cmd]+{shift]+[K] (see).

No, as all notes inherit $HideDisplayedAttributes. But as all notes can hold discrete values, just use whatever form of inheritance (prototypes, rules, etc.) to enforce the change of state as you choose. For instance, a rule (or a stamp) might set the $HideDisplayedAttributes value for all the children, or descendants, of the current note to the value set in the current note.

Dear Dr. Mark Anderson,
Thank you very much for your detailed explanation.
I will try to set the $HideDisplayedAttributes value for all the children.
Respectfully, WAKAMATSU

1 Like

Dear Dr. Mark Anderson,
I try to set the $HideDisplayedAttributes value for all the children.
When I Apply to Test cell which you gave me as a zettelcode-demo-md1.tbx.
Test cell and ant notes are operated with this Stamp:

$HideDisplayedAttributes=sum_if(descendants($Prototype=="Zettelnotes"),1)

zettelcode-demo-Stamp-ToTestcell

It is saddled with a mountain of problems.
How can I mark up those behaviour ?
I get the big things wrong.
Please give me a piece of advice.
Faithfully, WAKAMATSU

Rubbish in … rubbish out! :wink:

HideDisplayedAttributes is a boolean attribute, i.e. true or false.

sum_if() sums numbers - so not a boolean result. So your code means

boolean = number

In this case any number that is not zero will result in a true. So 0 gives false, 1 gives true, but -1 also gives true

Thus, if any (1 or more) descendants of the stamp’s note (here “Test Cell”) uses the “Zettelnotes”, the prototype, the HideDisplayedAttributes value for note “Zettelnotes” will be true, i.e. the Displayed Attributes table for that note will be hidden.

But alternatively, if no (zero) descendants of the stamp’s note (here “Test Cell”) uses the “Zettelnotes”, the prototype, the HideDisplayedAttributes value for note “Zettelnotes” will be false, i.e. the Displayed Attributes table for that note will be shown.

So, that is what is happening. What you haven’t explained is what you wanted to happen.

Also remember that attribute inheritance is not connected to the outline. A child does not inherit its parent’s attribute values (at least, without any code being written). Instead, it uses the document default, or the prototype’s value if there is a prototype and is has a custom value.

So, you say:

I try to set the $HideDisplayedAttributes value for all the children.

So, I read that as you wish to toggle (i.e. show or hide, via $HideDisplayedAttributes) the Displayed Attributes table of child (or all descendant?) notes. But, based on what criteria?

Possibilities:

  • if any child note has the prototype “Zettelnotes”, then all notes show the Displayed Attributes table?
  • if any child note has the prototype “Zettelnotes”, then all (but only) notes using the prototype show the Displayed Attributes table?
  • either of the above but testing descendants as opposed to just children.

Also, if the prototype is setting the Displayed Attributes table content, you could use a rule like:

if($HideDisplayedAttributes(prototype){
  $HideDisplayedAttributes=true;
}else{
  $HideDisplayedAttributes=;
};

Using the above, if you hid the Displayed Attributes in the prototype, all notes using the prototype would do the same.

Another way to do the same without the rule is to make two new prototypes:

  • “Table-on”. Make $DisplayedAttributes the value currently used by prototype “Zettelnotes”.
  • “Table-off”. No customisation at all.

Now, in prototype “Zettelnotes” reset $DisplayedAttributes to the document default of “”, i.e. nothing.

To toggle the “Zettelnotes” Displayed Attributes table on off, you set the prototype’s prototype, i.e. the $Prototype for the “Zettelnotes” to either “Table-on” or “Table-off”.

The “Zettelnotes” prototype will now inherit its Displayed Attributes table from the latter prototype. If “Table-off”, it inherits an empty table so none is drawn (it doesn’t need hiding!) for the prototype and all inheriting notes. If “Table-on” is selected it inherits a table which is now drawn for the prototype and all inheriting notes.

To test the last idea above I suggest a new document (not a copy of an old one). Make sure no local values are set for $DisplayedAttributes or $HideDisplayedAttributes in any of the notes using the “Zettelnotes” prototype. Also make sure the prototype has no rule or edict code (at least not code that affects the Displayed Attributes table).

NOTE: this last method works if you are affecting one feature (here the Displayed Attributes table). It would not work if you wanted to separately control Displayed Attributes and Display Expression; it could but you’d need four new prototypes (both on, Displayed Attributes only, Display Expression only, neither).

However, you can easily have multiple, switchable Displayed Attributes choices via this method. Let us imaging you want a different Displayed Attributes selection for your Zettel notes depending on the task at hand. Now, instead of “Table-on” you would have “Table-on1” and “Table-on2” which each having different Displayed Attributes table items.

My use of prototype names like “Table-off” are only for illustration and they have now special meaning to Tinderbox; they are just the names of prototypes.

Dear Dr.Mark Anderson,
Thank you very much for your time and valuable advice.
I was not able to put in the right things that I should have.
I am learning a lot.
I will continue to chew on each of your points and go through trial and error.
Respectfully, WAKAMATSU

1 Like

Dear Dr.Mark Anderson,
Thank you very much for your time and valuable advice.
I prepared a new note, learning what I have not mastered yet from the page you advised in the Tinderbox Forum, and tried to use that note to turn the Table on and off.
[[Tracking progress in summary tables]]
I was able to confirm the behavior of changing the Prototype specified in the note to “Table-on” and whether DisplayAttributes is hidden.
Summary DisplaysTest.tbx (96.1 KB)

I put HideDisplayAttributes in ZettelnotesPrototype itself and
function using check/uncheck to turn the whole thing off.
The work on each note is done using the shortcut I would like to use the shortcut “shift+cmd+K” to show/hide each note depending on the purpose at the time.
I am currently setting up a prototype of “Table-on” to see how it works.
Thank you very much for your detailed advice.
I think I have understood most of what you have taught me. I think I understand most of what you taught me. What do you think?
Respectfully, WAKAMATSU
P.S
I have not yet found a way to switch between prototypes using Stamp.
This is my future task.
P.P.S
A lot of ideas have been popping up since the advice from you the other day.
—”Instead of Table-on, there will be “Table-on1” and “Table-on2”,
each of which will have table items with different display attributes.— described,
if we apply this method I am thinking that this method can be used instead of
chapter and section in LaTeX Style??

I don’t really understand your ‘Summary DisplaysTest.tbx’. For instance:

  • only note ‘AA’ uses prototype ‘Table-on’, so how is the prototype supposed to affect other notes?
  • the numbered notes use prototypes but some use the prototype’s Displayed Attributes and others are edited. Why?

The document is useful as a reference but, first could you clean out your experiments so what others see is just what you intend and not the remains of failed experiments? Having done that, what do you want us to try and do?

I can’t find this in your ‘Summary DisplaysTest.tbx’, so I am confused.

“shift+cmd+K” shows and hides the current note’s Displayed Attributes table display. BUT, if you do that you break the inheritance of $HideDisplayAttributes. Which do you want to do?

Dear Dr.Mark Anderson
I am sorry for any confusion this may cause you.
I wrote the wrong file name.
I should have written that I added it to HideDisplayAttributes in Sequential Notes.
As you have pointed out, I have been inconsistent in my policy.
I will report back after some more careful experimentation.
Respectfully, WAKAMATSU

1 Like

No worries - and I’m aware of our lack of a same first language. :slight_smile:

Try this (changes described below): Summary DisplaysTest-1.tbx (112.4 KB)

I’ve made all the red/green/blue/orange prototypes use ‘Table-on’ as their prototype. Now I select ‘Table-on’ and use ⌘+⇧+K or the disclosure triangle to hide that prototype’s Displayed Attributes table. Now select any numbered note, such as ‘1’ or ‘24’ and their Displayed Attributes are now hidden. Re-select ‘Table-on’ and use ⌘+⇧+K or the disclosure triangle to show that prototype’s Displayed Attributes table. Now select any numbered note, such as ‘1’ or ‘24’ and their Displayed Attributes are also now hidden.

Next, select note ‘11’ and use ⌘+⇧+K or the disclosure triangle to show the Displayed Attributes table in that note. Now repeat the above noting that whichever the state inheriting from ‘Table-on’, the table in note ‘11’ always remains showing. Why? Because by setting it locally in note ‘11’ that breaks inheritance of $HideDisplayedAttributes from prototype ‘Table-on’ via prototype ‘red’.

I also fixed your $TableExpression for the ‘Sequential Notes’ container as all 4 columns were counting ‘red’ items as opposed to the colour at the top of the column. As all children use one of the 4 prototypes, the sum (by eye) of those 4 columns should equal their parent container’s $Child count. So, I’ve added a column for ‘n/a’ ('not applicable, i.e. no prototype) and one for the container’s $ChildCount. I’ve also added a child (with no prototype) to container ‘DD’. The result is here:

I’ve stored your original table expression and my new one in two code notes (using the ‘Code’ built-in prototype) to make the code easier to read.

Dr. Mark Anderson,
Thank you for your thoughtfulness.
I have been feeling a bit down because I do not have the ability to think in a straight line.
I am very grateful to have an English gentleman to guide me in the right direction.
I am very grateful for that.
The original meaning of the Japanese word “arigatou” is “rarely”.
The original meaning of the word “thank you” in Japanese is “it does not happen often”.
Therefore, the current usage of the word “thank you”.
This is the meaning of the word in use today.
My feelings are very similar to the origin of the word.
Your concern and guidance on this occasion reminded me of the following
In 1970, when I visited the Lloyds Bank in the city centre of London (as I recall) to exchange some money, the banker asked me a question to which I responded with a contraction like “I don’t know” and he kindly told me.
"Use proper English. From now on, you should use ‘I do not’.
I obeyed what he taught me and since then I do not use contractions in conversation or in listening.
It is not easy to learn the correct usage,
but many people have shown me the right way to go.
I would like to go back to the beginning and learn Tinderbox again.
I am going to read every detail carefully and try to learn the things you taught me.
Once again, I would like to thank you.
Respectfully, WAKAMATSU

1 Like

Thank you.

Unfortunately ‘thank you’ does not happen often enough in English as well. :frowning:

I am sorry as English (or more precisely for me British English or ‘BrE’) is a languages where most of the ‘rules’ are exceptions to rules. The 1970s bank clerk probably meant well, but language habits drift over time. I think “don’t” and “do not” are equally used in both spoken and written English.

However, around Tinderbox 8 time, I removed all the contractions from aTbRef to try and make it more clearer in meaning for translation.

Meanwhile, I hope the examples in previous answers above help to to resolve your problem.