Re: [sword-devel] Getting entry by key for a lexicon module.

2022-01-03 Thread David "Judah's Shadow" Blue
On Monday, January 3, 2022 2:21:41 PM EST Troy A. Griffitts wrote: > Hi David. You should skip the attempt to parse a verse list. Something > simple like: > > module->setKeyText("Moses"); > SWBuf entryBody = module->renderText(); > SWBuf entryKey = module->getKeyText(); Ah yes, this is what I was

Re: [sword-devel] Getting entry by key for a lexicon module.

2022-01-03 Thread Troy A. Griffitts
Hi David. You should skip the attempt to parse a verse list. Something simple like: module->setKeyText("Moses"); SWBuf entryBody = module->renderText(); SWBuf entryKey = module->getKeyText(); Notice the renderText call before the getKeyText call. renderText will "snap" the requested key to

[sword-devel] Getting entry by key for a lexicon module.

2022-01-03 Thread David "Judah's Shadow" Blue
Ok. So I'm looking at getting a specific key for a lexdict module. I tried the same as I do for bibles/commentaries. sword::ListKey refRange; refRange = key.parseVerseList(reference.c_str(), key, true); for(refRange = sword::TOP; !refRange.popError(); refRange++) {