Re: getKeyText() doesn't always return keys.

"David \"Judah's Shadow\" Blue" <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <2403136.4kjgpJ9NHH@brooks>
On Thursday, March 28, 2024 2:11:19 PM EDT Troy A. Griffitts wrote:
> Hi David,
> 
> The weirdness you might be running into is the behavior that SWLex
> modules 'snap' their key to the nearest entry upon renderText (or
> stripText, as you are calling).
> I know this doesn't seem completely intuitive, but I would try calling
> stripText BEFORE calling getKeyText().

That actually makes a lot of sense based on what I've seen, where I 
occasionally get a key I entered previously.
 
>  I wouldn't recommend using
> setPersist.  This will force the module to use the same external key and
> let you manage cleaning up that key memory when you are finished, rather
> than letting the module manage its own internal key.

That also makes sense. And yeah I don't want to be managing the keys myself so 
I'll avoid setting persist.

> I hope this helps.

Yes, it does. Thanks,


_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.