[bt-devel] OSIS crossrefs rendering bug (added by Martin, patch by Troy - BibleTime or Sword bug?)

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Sun May 10 15:18:16 MST 2009


Martin Gruner wrote:
> Hi Eeli,
> 
> attached you can find the original patch by Troy with the debug method that he 
> used. Good luck!  :-P
> 

OK, I added the debug function to bt_osishtml.cpp. It's called like this:

#ifdef SWORD_SIMPLERENDER
	sword::SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
	qDebug() << "swordFootnote:" << footnoteNumber;
	dumpEntryAttributes(myModule);
	sword::SWBuf footnoteBody = 
myModule->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
	buf += myModule->RenderText(footnoteBody);
#endif

In the first time in a verse, when the footnote number is 1, it gives this:

(BibleTime 2.0.beta2) Debug: swordFootnote: 1 

(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES FOR KEY:  Psalms 100:2 

(BibleTime 2.0.beta2) Debug: [  Footnote  ] 

(BibleTime 2.0.beta2) Debug:    [  1  ] 

(BibleTime 2.0.beta2) Debug:             body  =  [<reference 
osisRef="Ps.2.11">Ps. 2:11</reference>] 

(BibleTime 2.0.beta2) Debug:             n  =  q 

(BibleTime 2.0.beta2) Debug:             osisID  = 
Ps.100.2!crossReference.q
(BibleTime 2.0.beta2) Debug:             osisRef  =  Ps.100.2 

(BibleTime 2.0.beta2) Debug:             refList  =  Ps.2.11 

(BibleTime 2.0.beta2) Debug:             type  =  crossReference 

(BibleTime 2.0.beta2) Debug:    [  2  ] 

(BibleTime 2.0.beta2) Debug:             body  =  [<reference 
osisRef="Ps.95.2">Ps. 95:2</reference>] 

(BibleTime 2.0.beta2) Debug:             n  =  r 

(BibleTime 2.0.beta2) Debug:             osisID  = 
Ps.100.2!crossReference.r
(BibleTime 2.0.beta2) Debug:             osisRef  =  Ps.100.2 

(BibleTime 2.0.beta2) Debug:             refList  =  Ps.95.2 

(BibleTime 2.0.beta2) Debug:             type  =  crossReference 

(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES end


But all the rest of the footnotes in the same verse give this:

BibleTime 2.0.beta2) Debug: swordFootnote: 2 [or 3 or...]
(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES FOR KEY:  Psalms 100:2 

(BibleTime 2.0.beta2) Debug: ENTRY ATTRIBUTES end

So, somewhere between these calls the attributes of the key have 
disappeared. I have made sure that the objects are the same each time.


--Eeli Kaikkonen



More information about the bt-devel mailing list