[sword-devel] Counting Keys in a Module
mmital
mitalmanu at hotmail.com
Mon Apr 21 12:08:10 MST 2008
Hello,
I was just wondering if you managed to solve your problem. I had the same
question. Thanks,
Jeremy Erickson wrote:
>
> Hi,
> What is the proper way in Sword to quickly determine the number of keys
> in a
> module? Currently in BibleTime we use the following code to determine the
> starting and ending indices:
>
> *m_module = sword::TOP;
> unsigned long verseLowIndex = m_module->Index();
> *m_module = sword::BOTTOM;
> unsigned long verseHighIndex = m_module->Index();
>
> This code works as expected when the module is a Bible, but it does not
> work
> when the module is a Lexicon. In this case, the Index() function always
> returns 0. Is this because StrKey does not reimplement the Index()
> function?
> In any case, what would the cleanest way for me to count the keys in a
> module
> be, so that it works with all types of modules?
>
> -Jeremy Erickson
>
> _______________________________________________
> 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
>
>
--
View this message in context: http://www.nabble.com/Counting-Keys-in-a-Module-tp13751999p16809185.html
Sent from the SWORD Dev mailing list archive at Nabble.com.
More information about the sword-devel
mailing list