I thought it might be useful to show the task at hand. Here, I’ve copied a the <item> code for the ‘HTML’ prototype from an Oct 2023 TBX, using v9.6.1. I did the same for one for Oct 2014 (when the prototype was called ‘HTML Template’), c.6.1.0. For the current version of the app aTbRef has the prototype’s customisations in detail, for v6.x we have them in lesser detail.
I’ve copied each 'item into a new BBEdit document, selected both and opened a ‘compare’ window:
Notice that as I’d only briefly opened the old file, Tinderbox hadn’t yet updated the system attributes to add ones not present when the TBX as last used (e.g. $DominantLanguage, $Sentiment, etc.)
So what differs?
- $ID. Well we could expect this but no change is needed in the ‘old’ doc as ID is how Tinderbox finds the right things under the hood
- $Created, $Modified. Obviously different but no change needed.
- $Dominant Language, $ScreenHeight, $ScreenWidth, $Sentiment, $Sentiments. These will get auto-added by the app but have no effect on the prototype’s function. you can either update the old file or let Tinderbox add these if/when it needs to do so.
- $Name. In most cases you’d expect this to be the same, but here is a case where Tinderbox re-named a built-in prototype. Think carefully before changing the name just to look current. Consider where the old name may be used in action and export code as those instances would need updating
- $NeverComposite, $NoSpelling, $ZipLinks. These are non-default customisations for the current app so do want adopting.
- $OnAdd. This is where a deliberate check is worth while. Note how the code there uses the prototype’s $Name. The old addition of setting $IsTemplate is likely an edit by me and is not needed as the $OnAdd sets the new note’s prototype and that already sets $IsTemplate.
- $Tabs. This recent addition is a boon so we’ll likely adopt in. TBH< I find the default set is never enough and are wasteful of horizontal space so usually (not here but for longterm TBX where I’ll export actively) put more, but closer spaced tabs. So this is a good example where you might want to keep you existing value over the default.
Hopefully this shows how ‘just’ updating via action code without any detailed check first may be sub-par. But would could always do a review like above and edit the data from within Tinderbox if that feels more comfortable.
Not shown here are the <preferences> which I’ve found to be as important as prototype settings when updating a file. As some are in Doc settings, some in the Inspector panes and some elsewhere, again the UI isn’t the most effective way to truly update your document.
If you have 10s of documents from the same era, you could do a detailed check for one document, not the changes and then use a mixture of action code and the UI set the desired’ updated values. If the docs are of different vintages you would do well to do the initial tests against one of the oldest docs.
Copies. Work on copies in case you make a mess. Once the copy is updated you can archive or delete the original version. Note that when you open an old document, Tinderbox will update it with new system attributes, etc. So. If you wish to keep the original in its original form this is another reason to use a copy.
Duplicate or copy with new ID? Note, each TBX document has an invisible Unique document ID (it is in the XML). But if you duplicate the document in-app or via Finder (or copy/paste in finder) the doc ID remains the same. To create a new version of the doc with a discrete ID, open the document in Tinderbox and then use File ▸ Save As (you need to hold down the Option key to see this in a menu). The saved copy will be given a new ID.