I’m learning Tinderbox and before I use it for the purpose I intend–a large number of research notes–I’m building a couple of simple, but serious, documents to learn how it works. I have some questions so far for which I have not found answers.
Can I change the typeface (font) of the Summary displayed on an agent in map view?
How do people debug actions? Are there any tricks for displaying intermediate values so one can see what is going on? Ideally, I’d like to be able to “print” values to a text file or console. E.g. could I use $HoverExpression as a console?
Is there a way to make Regex arguments to string operators like .replace() case insensitive? E.g. /sold/i versus [sS][oO][lL][dD].
What is the most efficient code for removing a string from the $Text of a note (or from any attribute)? Let me explain by saying I imported about 65 records in TSV after munging it in a text editor. Some of the fields in the records which are now in attributes are not as I would like. So, for example, I have:
$nib whose value is “Delrin, M Ti nib, stubbed”
Eventually I want to append the ‘Delrin’ to $Text and make ‘Ti’ the value of $nibMaterial and I’d like to end up with $nib as ‘M stubbed’
I have an agent with a $Query that gets me the records I want. I have an $Action to do the bulk manipulations. At the moment I’m using .replace with one argument to delete substrings. What I want to do in as few steps as possible is a sequence in which I a) grab ‘Ti’ b) assign it to $nibMaterial c) purge it from $nib. In effect, I want an operator like this:
$nib.excise(“pattern”)=$attribute
If the pattern is found, $nib is set to the remnants of the string with “pattern” removed, and $attribute is set to the value of what pattern actually matched. Obviously, I want pattern matching so the Action is flexible.
I suspect either there is an obvious way to do this or that I am making bad choices about how to structure my notes, e.g. by relying on attributes too much.
I appreciate any suggestions or answers.