Thank you all for the responses. Somewhat abashedly after @eastgate reported this simple test, I realize I should have done more testing on my own. I had thought I had isolated the problem but the actual expression is more complex. I now suspect that I may be entirely wrong about what the problem is. the symptom was that this part of the export did not appear. I will go back now and do a proper test and report back.
Thank you for confirming that, aside from the deprecated lack of dollar signs, there is no obvious syntactic error relating the parentheses as shown.
OK. I am embarrassed to admit that looking at the terrible morass of export code, I would need to go back to the old version and do a diff and, while I maintain lots of backups (including snapshots of the file copied by Hazel plus time machine backups), I let enough time go by so that the previous version has gone missing.
I apologize for a half-baked question!
Lessons Learned:
do not post until I have an example that suffices to reproduce the problem (seems obvious, now that I say it) and preferably the actual code
grab before and after versions of the code while they are still in my backup folder
I think the most important follow up for me is to improve my skills for formatting, testing, and debugging export code. I will go browse the forum and atbref to skill up!
Thanks for all the wonderful support you all provide on this forum and elsewhere!
Donât be too harsh on yourself. Tinderbox is, by software standards, a long-lived program and much has changed over time. Query language (the #-prefixed codes) have gone and action code has subsumed many export codes. At the same time, action code used to be a much more loosely defined syntax. however, as the range and depth of action code has grown it has been necessary for the user to be a bit more precise in defining intent. Some old code still worksâEastgate is kind to long-term users in not deliberately breaking existing code just to enforce new rules. Thus the above point about $-prefixes.
Long ago one might have written:
Color = 1
Whereas now general convention is to write:
$Color = "1";
With such a simple example, both still work but the second requires far less correct guesswork on behalf of the app. In some more complex cases the less guesswork we ask of the app the better! $Color makes it emphatic we are making a reference to the current noteâs âColorâ attribute. "green" makes emphatic that we are providing a string value for a color named â1â. Otherwise Tinderbox might try and choose the first defined colour nameâs (i.e. âcolour #1â) value, etc. The semi-colon, though not strictly needed here makes emphatic that this is the end of the current expressionâakin to a full stop at the end of a sentence.
Though it always feels like a pain in the ***e I generally update code when opening an old file I intend to keep using. Yes, it normally breaks something on first pass, but the result is more robust going forward.
So, we share your pain! Donât be too self-editing, this community is here to help and sometimes âupdatingâ code is less obvious than at first thought. Anyway, I hope youâre fixed now and if not do ask.
Thank you for your kindness and encouragement! and for clarifying the update in syntax. I just went back and added $ for all attributes and confirmed that code is now working. I am all set on this now and will look forward to tackling the next challenge!