Literature Review with Tinderbox

Yes, I will have a look at the code again.

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!

1 Like

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.

Tom

I’d agree! I’ve never seen this before. :open_mouth:

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;

I’ve used the latter in the uploaded file: Discourse_Graph_v.0.2-ed.tbx (7.0 MB)

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! :wink:

Thanks for the feedback! I will look into it

3 Likes

No sir, never feel embarrassed for trying. This was much better than I could have ever done!

I am proud of you and glad you shared it at this stage. It completely opened my eyes in this new direction. Job well done… Onwards!

Tom

2 Likes

Thanks for your kind words!

It seems to be a bigger issue than I thought. I will have a look at it tomorrow morning :wink:

3 Likes

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.

4 Likes

I will, thank you!

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.


I don’t see what makes them so special. Any help will be very appreciated!
TBX file:
Discourse_Graph_v.0.2.6.tbx (7.0 MB)

$OnAdd action:


  if($ClaimInformsQuestionID){
    $ClaimInformsQuestionID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Informs");
    };
  };
  if($EvidenceOpposesClaimID){
    $EvidenceOpposesClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Opposes");
    };
  };
  if($EvidenceSupportsClaimID){
    $EvidenceSupportsClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Supports");
    };
  };
  if($ClaimOpposesClaimID){
    $ClaimOpposesClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Opposes");
    };
  };
  if($ClaimSupportsClaimID){
    $ClaimSupportsClaimID.each(listValue){
      linkTo(find($Name(parent)=="Synthesis Map" & $Name==$Name(listValue)),"Supports");
    };
  };

}; // end function

Thanks!
Arek

One point that is probably not your problem, but might be useful to address at some point.

  1. Rather than testing
$Name(parent)=="Synthesis Map"

consider using inside(/path/to/Synthesis Map). The latter is potentially more efficient, and has some advantages for the semantics of aliases.

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.

If you don’t want agent update’s to re-organise the agent map, see Re-arrangeable Agent Maps.

I think you are acting accordingly but I’d note to be aware aliases may have different basic (i.e. note-to-note) links than their original.

Thanks!

This is really helpful and intriguing, Arek. Thank you for sharing your extensive work and process with us.

Marianne

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!)

1 Like

Hey there, couple

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.

1 Like

I added a couple of tags to the thread, but good ideas can get lost in tags just as with anything else.

I strongly suggest for anyone interested in a given post or thread, that the “bookmark” feature in Discourse is excellent.

Click the three dots in the tools at the bottom of a post, and then click the bookmark icon

You’ll have several options -– choose a reminder or choose “none needed” to make a permanent bookmark for yourself.

When you want to find your bookmarked topic, click your person-icon and choose the bookmark icon again.

4 Likes

OMG!

This is way too much work, but interesting.

I basically batch add bibliographic info into DevonThink for each note from a text, then I just drag the files to TB.

There, I have in a container propositions with adornments which add a statement such as verifies, denies, etc. I drag notes there.

I’m going to have to take a closer look at your work, but for someone like me… I’ll throw my computer out the window!

I also add

2 Likes

I’ve lately changed my workflow substantially. I’m planning to update this topic as soon as I have some spare time :wink:

4 Likes

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.

1 Like

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.

Tom

2 Likes

Hi ShiJianhui

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.

Did you get a chance to watch it?

All the best,
Tom

1 Like