Tinderbox Forum

Adding a basic link changes $Name of destination note

(Yuval Gavish) #1

When I add like to a note from another note, the $Name of the receiving note changes. The evaluated $DisplayExpression becomes the new $Name, and now the $DisplayName is the new $Name+$DisplayExpression.
Any idea?

(Mark Anderson) #2

Can you post step-by-step instructions to re-create it and or a minimal TBX that shows the problem.

Links themselves don’t create such behaviour so I’m guessing to have some OnAdd or other action with is causing the effect you see but we can’t.

(Yuval Gavish) #3

This strange behavior is new to me too. It never happened before. It started like this only recently - possibly after I upgraded to TBX8. Since it was while working on my main project which is not small, I thought it has to do with some weird command or connection I made. But after hours of trying solving it, I realized that linking simply changing the $Name, so it becomes the $DisplayExpression, and since the $DisplayExpression contains the $Name attribute, the new $DisplayExpression is now not working right.
So, I started a new fresh TBX document and did this:

  1. create a note $Name “hi”
  2. create a note $Name “bye”
  3. in the $DisplayExpression of “hi” write $Name + " Bug";
  4. link “bye” to “hi”
    result: hi $DisplayName == “hi bug bug”

(Paul Walters) #4

Ugh. That’s repeatable (8.0.3). Very strange.

Hi Bug Bug.tbx (75.8 KB)

What’s more, once the bug is introduced into the file, it seems ineradicable.

  1. Change $DisplayExpression for “hi” to $Name, the duplicate “Hi Bug Bug” changes to “Hi Bug”, even though “Bug” is no longer part of the DE.
  2. Change $DisplayExpression for “hi” to $Name + "boo", and “hi” still shows “Hi Bug” as $DisplayName.
  3. Use QuickStamp to set $DisplayExpress to “default value” (none) and “hi” still shows “Hi Bug” as $DisplayName.

In the XML it seems that rather than set $DisplayName that Tinderbox modifies $Name directly. The embedded in item …793 (no closing </item> tag) there is another item …799.

<item ID="1559493793" Creator="system" >
<attribute name="Associates" ></attribute>
<attribute name="Created" >2019-06-02T12:43:12-04:00</attribute>
<attribute name="IsComposite" >false</attribute>
<attribute name="MapScrollX" >0</attribute>
<attribute name="MapScrollY" >0</attribute>
<attribute name="Modified" >2019-06-02T12:43:12-04:00</attribute>
<attribute name="Name" >Hi Bug Bug</attribute>
<attribute name="Xpos" >0</attribute>
<attribute name="Ypos" >0</attribute>
<item ID="1559493799" Creator="system" >
<attribute name="Associates" ></attribute>
<attribute name="Created" >2019-06-02T12:43:18-04:00</attribute>
<attribute name="DisplayExpressionDisabled" >false</attribute>
<attribute name="IsComposite" >false</attribute>
<attribute name="Modified" >2019-06-02T12:43:18-04:00</attribute>
<attribute name="Name" >hi Bug</attribute>
<attribute name="SelectionCount" >14</attribute>
<attribute name="Xpos" >-3.132324219</attribute>
<attribute name="Ypos" >-8.667358398</attribute>

(Mark Anderson) #5

Notifying @eastgate.

(eastgate) #6

It’s an unwanted interaction between the link editor (which, as you know, can be used to name or rename notes) and the $DisplayName. It should be fixed in 8.0.4

(Yuval Gavish) #7

Thank you. Looking forward to that fix

(eastgate) #8

It’s already fixed in a backstage test release. For more on the backstage program, see https://www.eastgate.com/Tinderbox/Backstage.html .