Jumping tabs when viewing a preview

Hi Folks:

The title is the best I could come up with. Consider the following file:

jumping_tabs.tbx (209.3 KB)

The second tab is opened on an agent that is collecting KeyIdeas from Chapter 1. The third tab is is opened to the contents of chapter 2. If I enter preview mode for the middle tab and then select the third tab, the outline context switches to agent I have been viewing in the second tab.

Is this expected behavior ?

I suspect there is no ‘expected’ behaviour, or rather the expected behaviour is that you would revert to the Text tab before switching tabs. Still, it does seem an undesirable outcome, not least as the new tab is switched back to Text mode yet with the ‘wrong’ selection.

For now, either navigate the document using the links in the rendered HTML of the Preview tab (how in-doc use of Preview is likely envisaged), or revert to text display before switching tabs.

Fair enough. My use case is as follows. I’m working through a long text, chapter by chapter I am creating paragraph summaries. I collect these in an agent and view my version of the chapter via the preview facility. As I work on subsequent chapters it is handy to be able to scan the previously summarized chapter to identify connections. That is how I came across the ‘surprise’.

Thank you

1 Like

Simpler might be to set the agents to sort on original order:

Then, give the agent this $Edict:

More efficiently, make a prototype with that edict and the $SortTransform so you can easily configure the agents as you add then. No faffing around with templates needed, especially as this is for in-app viewing and you aren’t using any export code.

Here is the edict code used above:

var:list vList = collect(children,$ID);
$Text=;
vList.each(anID){
   $Text+=$Name(anID).bold+"\n";
   $Text+=$Text(anID)+"\n";
};

Now this is a real improvement on my approach. Thank you.

1 Like