To avoid accidental editing it may be desired to make a note 'read-only', i.e. non-editable, but there is no single setting that allows this.
However there are two system attributes that cover aspects of this. Both date from the early days of Tinderbox before current heavier use of action code and so address only UI interactions.
Here, 'note' applies also to adornments, aliases, and agents.
ReadOnly attribute
The $ReadOnly system attribute affects only UI, i.e. manual, editing of the text pane, excepting the title bar. Thus it controls manual edit of:
- in the text pane:
- the $Text area.
- the Displayed Attributes table (if used by the note). If $ReadOnly is included in the table it is always editable.
- aliases of a note will honour the original note's setting (i.e. $ReadOnly is not intrinsic)
- use of Get Info, as a pop-up or as a stand-alone window
The original conception for $ReadOnly was to 'lock' the $Text of notes using AutoFetch to avoid the auto-imported $Text fighting against user manual edits. Later, scope was added to include Displayed Attributes. This explains the manual/UI-only nature of the setting.
A note's $ReadOnly has no effect on:
- $ReadOnly is always editable via any means
- manual editing in the UI of the view pane
- matching queries
- action code (including stamps and the Quickstamp Inspector).
- AppleScript or other inter-app/OS scripting
Though action code may be set to check a note's $ReadOnly state, this would need to be applied individually to every affected action. There is no centralised switch for such behaviour (beyond using prototype-inherited code).
$ReadOnly can be set via:
- Get Info ▸ Attributes
- Text Inspector, Text sub-tab.
- the Displayed Attributes table (if $ReadOnly is included as a Displayed Attribute)
- action code or external scripting of $ReadOnly
Lock attribute
The $Lock system attribute affects only the view pane and is was originally conceived for Map view use. It controls several view pane:
- Map position, i.e. $Xpos and $Ypos
- Map icon size, i.e. $Width and $Height
- Selecting locked notes:
- Locked items cannot be drag-selected (i.e. dragged marquee/band-box selection)—locked items are always omitted from such selections.
- Locked items can be selected by manual click. In map view (only) selected locked items show no icon resize handles. The only indication of a selected locked item is the presence of the link-drag arrow (in views that use that), and even then the arrow is only shown if a single item is selected.
- moving locked notes:
- a locked note cannot be drag-repositioned in the view. This includes in other views, Outline, etc.
- reflecting the fact $Lock was really designed for map use, the Note menu's Move Note Up/Down controls can be used to affect map icon stacking order.
- similarly, the View ▸ Arrange menu and shortcuts do work. Alignment menu commands will override the $Lock status without changing the actual $Lock value and thus may alter note width, height and X/Y position values.
A note's $Lock has no effect on:
- manually editing title ($Name) subtitle ($Subtitle) or badge ($Badge) via the note icon in the view pane
- manual editing in the UI the text pane
- matching queries
- action code
- AppleScript or other inter-app/OS scripting
$Lock can be set via:
- for adornments only, when selected, via clicking the padlock icon. Note that the icon used for $Lock state can be customised.
- Get Info ▸ Attributes
- Properties Inspector, More text sub-tab.
- the Displayed Attributes table (if used as a Displayed Attribute, but only if $ReadOnly is
false
) - action code or external scripting
See also—notes linking to here: