[sword-devel] SwordReader - another really silly problem

Troy A. Griffitts scribe at crosswire.org
Fri Dec 28 11:41:29 MST 2007


Hey guys.  As Barry pointed out, canon.h stores a preferred abbreviation for
each book.  There are a couple ways to access this.  If you are currently
pulling the book name from the book structure's 'name' member, then you can
use the 'prefAbbrev' member instead.  If you are using VerseKey methods
directly, like getText(), you can instead use getShortText().  I think
getShortText was added for the QPSword pda app.  You can see it used in the
search results in the first screenshot here:

http://crosswire.org/qpsword/#ss

The preferred abbreviations is still ~3-5 characters, so I'm not sure if
these will be small enough for your purposes.  They are also not yet
internationalized, so they will not change if you change the sword engine's
locale.

Hope this is useful.

  -Troy.

Barry Drake <bdrake at crosswire.org> wrote: 
>Hi David ..........
>
>David Trotz wrote:
>> That's classic :-)
>> I wonder if there is a way to get the abbreviated book names from the
>> sword engine
>
>It's all in canon.h which is mainly used by versekey, so I don't think 
>it would be difficult to get stuff from there.  It would probably be 
>better than working with the hard coded version that we have.  I never 
>did like that method.  Might be worth taking a look before we do a 
>simple fix.
>
>Thanks for the offer of help.  I got it though.  It was a case of my 
>using the same handle sequentially on a group of files without doing a 
>'close' in between.  Very easily done, but annoying because the code 
>looks OK, and builds OK.
>
>God bless,
>Barry
>
>-- From Barry Drake (The Revd) minister of the Netherfield United 
>Reformed church, Nottingham see http://www.jesusinnetherfield.org.uk for 
>our church homepages).
>
>Replies - b.drake at ntlworld.com
>
>_______________________________________________
>sword-devel mailing list: sword-devel at crosswire.org
>http://www.crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page
>
>





More information about the sword-devel mailing list