Re: [sword-devel] Best way to work with Genbooks

2024-05-01 Thread Klaus R. H. Walther
Hi David, I don't know the classes you are using, but maybe you have to do something like this:     if(treeKey->firstChild()) {     do {     this->toc += treeKey->getText();     //Add a space around the new line for the tokenizer to split on     this->toc += "\n ";   

Re: [sword-devel] Best way to work with Genbooks

2024-05-01 Thread Klaus R. H. Walther
Hi David, I don't know the classes you are using, but maybe you have to do something like this: if(treeKey->firstChild()) { do { this->toc += treeKey->getText(); //Add a space around the new line for the tokenizer to split on this->toc += "\n ";

Re: [sword-devel] Best way to work with Genbooks

2024-04-04 Thread David "Judah's Shadow" Blue
On Thursday, April 4, 2024 11:17:57 AM EDT you wrote: > Hi David, > > I don't know the classes you are using, but maybe you have to do > something like this: > > if(treeKey->firstChild()) { > do { > this->toc += treeKey->getText(); > //Add a space around th

Re: [sword-devel] Best way to work with Genbooks

2024-04-04 Thread David "Judah's Shadow" Blue
On Tuesday, March 5, 2024 2:05:39 PM EDT Troy A. Griffitts wrote: > Hi David, > > Traversing a tree without recursion usually required keeping a stack you can > push onto and pop when you hit a leaf. This is all handled for you in the > call stack when you use recursion. If you really do want to

Re: [sword-devel] Best way to work with Genbooks

2024-03-06 Thread David "Judah's Shadow" Blue
On Wednesday, March 6, 2024 10:01:38 AM EST Troy A. Griffitts wrote: > Hey David, glad you are making progress on the TOC. > > Yes, assureKeyPath will create the full path if it doesn't exist. > > If you would simply like to try to position a treekey to a path, you can > set it like any other SW

Re: [sword-devel] Best way to work with Genbooks

2024-03-06 Thread Troy A. Griffitts
On 3/6/24 07:49, David "Judah's Shadow" Blue wrote: On Tuesday, March 5, 2024 12:28:26 PM EST you wrote: Hi David, Traversing a tree without recursion usually required keeping a stack you can push onto and pop when you hit a leaf. This is all handled for you in the call stack when you use rec

Re: [sword-devel] Best way to work with Genbooks

2024-03-05 Thread Troy A. Griffitts
Hi David, Traversing a tree without recursion usually required keeping a stack you can push onto and pop when you hit a leaf.  This is all handled for you in the call stack when you use recursion.  If you really do want to avoid recursion, I would recommend having a look at general strategies f

Re: [sword-devel] Best way to work with Genbooks

2024-03-05 Thread David "Judah's Shadow" Blue
On Monday, March 4, 2024 4:32:43 PM EST David "Judah's Shadow" Blue wrote: > Ok, I think I have a handle on how to generate the TOC. However, I'm not > seeing a method in the API docs that would give me the text for a given TOC > entry Well I thought i had a handle on generating a TOC, but I'm onl

Re: [sword-devel] Best way to work with Genbooks

2024-03-04 Thread David "Judah's Shadow" Blue
Ok, I think I have a handle on how to generate the TOC. However, I'm not seeing a method in the API docs that would give me the text for a given TOC entry On March 1, 2024 4:38:02 PM EST, "David "Judah's Shadow" Blue" wrote: >I'm working on adding support for genbooks to BIBISH, but I'm not sur