[sword-devel] getKeyText() doesn't always return keys.
David "Judah's Shadow" Blue
yudahsshadow at gmx.com
Mon Apr 1 10:48:55 EDT 2024
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,
More information about the sword-devel
mailing list