[sword-devel] General Book Support

Joachim Ansorg sword-devel@crosswire.org
Mon, 11 Mar 2002 17:37:52 +0100

I implemented the rendering depending on the display level option, it works 
quite well. But I'm not sure if I'm using the right config entry because 
chiasma.org is down (Chris has the table of module entries there).

I noticed two things with General Book support:
	-Sword crashes if a book with a nonexistant or read-protected DataPath is 
opened (to test this simply add a Book module config with a path like 
"./yoyo", yoy shouldn't exist)
	-IMHo the following piece of code doesn't work properly:
	{ //TreeKeyIdx* tree is defined
		const char* rootName = key->getFullName();
		//do something with tree which changes the keyname

		//set root again

Setting again the root doesn't work because rootName is NULL (getFullName() 
after root() returns NULL), setting the key to NULL moves to the first child.

IMHO root() should return a key which can be used to set again to root() 
later on. To do this I have to use "/" at the moment.

Thank you for all the kind help on this list!

P.S.: Today I finished my school! Praise God!