Bug(?): duplicate adornment created by action

In the attached experiment, I have an adornment at the root. This adornment has an OnAdd action: createAdornment("Incoming");. If I create a note on the adornment, I expect it to have an adornment inside it called “Incoming”. And it does, but it actually has two of them! If I drill down into the new note container and drag the auto-created “Incoming” adornment a bit, it reveals another “Incoming” adornment behind it. This is a surprise.

Bug or user confusion?

TB Version 11.0.1 (b737)
macOS Sequoia 15.6.1 (24G90)

create-adornment-inside-any-new-note.tbx (156.9 KB)

I downloaded your document, and created a note A outside the adornment. All seemed OK.

I dragged A onto the adornment named Test: it gets one adornment inside the note.

I double-clicked the adornment Test, creating a new note. That notes does get two adornments. I agree it should only have one.

Yup, double-clicking or control-clicking (and selecting “Create Note”) on the Test adornment creates a note with two Incoming adornments inside. That’s what I meant. Interesting that dragging a note onto the Test adornment does not have the issue.

In the mean time, I can achieve the desired effect by creating a “New Project” prototype of a container note that contains an “Incoming” adornment and setting the OnAdd of my root adornment to $Prototype="New Project". Now, new notes created on the adornment will have one and only one “Incoming” adornment inside.

1 Like