That’s truly something I would never guess could happen… The only one external code editor I have been using while writing code for this TBX project was BBedit’s CLM for Tinderbox, and maybe Apple Notes… hard to say because it have taken me some time to code it before posting here.
I would be enormously grateful! I have next to nothing (action) coding experience, so every suggestion is very much appreciated!
Another issue I am noting… if you change your Research question in the Display Attribute dropdown for the Synthesis Map, nothing changes. Even if you change tabs, the expectation, I think is that the new question would be visible. My expectation could be wrong…
You might want to test the Synthesis map under a new question.
FWIW, what made me suspicious of invisible characters was that the comments in your function were the wrong colour, in Tinderbox, but comments I added were grey. Thus the test with BBEdit.
Here is a version of the TBX with strange line breaks fixed. I’ve also supplied alternate version of some edict functions using variables avoiding the needs for $MySetA, etc. The calling edicts use the original function, the alternate is there as an example (these functions use a ‘2’ appended to the name e.g. fClaimEdict2().
I’ve also made functions for the link actions. If you want to use the functions replace the current link action code with a call to the appropriate function. An added benefit of the function is you get syntax checking/colouring unlike in the Link Inspector’s action code box.
For some reason the Library container in you file’s ‘Hints’ wasn’t setting the ‘Action’ prototype for new children so I fixed that action too.
In fClaimEdict, you have this test:
if($ClaimInformsQuestionID!=;){
IOW, this query which doesn’t make sense:
$ClaimInformsQuestionID!=;
Queries don’t use semi-colons, so I assume you are trying to set is the set attribute ClaimInformsQuestionID has any content. You could check either of:
$ClaimInformsQuestionID!="";
// or better
$ClaimInformsQuestionID.count>0;
Thanks for all your feedback and help with fixing broken code!
I feel a bit embarrassed of not making sure everything works 100 % fine before sharing with the rest of the community, but on the other hand, maybe I could never be sure of that, and so never share anything…never mind, thanks again for help!
No need for embarrassment. Your code wasn’t ‘broken’ but rather hit by one of the more obscure line-break glitches I’ve come across and ironically only because you generously picked up on the idea of migrating code into functions. My input was really only some polish for edge cases.
You should take heart from the genuine notes of thanks for the community here. It’s always a joy when someone takes the time to share such a built-out example and to give notes on use. Really nice to see hyperbolic mode being given a role, too.
I think I’m onto something, but can’t figure out one thing (that I’m aware of). ‘Synthesis Map’ agent seems to work as intended, with one exception - some notes are somehow resistant to agent’s $OnAdd action, i.e. they don’t get linked as I want them to. In the screenshot below, there are 5 notes in red frames that should, but are not, connected to notes pointed by arrows.
Also (from brief scan-not time to test ATM) the Synthesis Map agent is off, so the agent action won’t be firing. If Evidence 6’s ‘Opposes’ link was added after the item was added to the agent map, I don’t think we expect the agent action (IOW, the agent OnAdd equivalent) to fire until the agent is active again.
I wonder if a tag or two could help to keep this post from getting lost? I see there’s one for “templates”–maybe also “case study”? (I’m the last person to suggest tags: I have far too many overlapping ones in my own work!)
BTW, I looked at a few of your functions. I see that you’ve named them an “edict,” “rule,” or “action.”
I fear this might confuse some people. Functions are action codes that can be used as edicts, rules or actions; they need to be specifically named in this way.
Also, you have several note names with the term “linked.” I would expect these actions to perform link operations when in fact, they do not. They are simply provided associates by basing values from one note to another.
Thanks. I think we all appreciate the work that goes into documenting (and updating) a process for others to be able ‘just’ use—even if some effort is required. Some things do take a bit of effort.
One additional area that could be considered in the design of this model, could be to add a prototype, pAssumption which could represent notes that are assumptions.
Just curious, are you still using / developing this discourse graph? Has anything changed. It has become quite the hit and was even mentioned by Joel Chan in his meetup.