Standalone riddle
J. Landman Gay
jacque at hyperactivesw.com
Sat Jan 14 18:24:44 EST 2023
On 1/14/23 1:55 AM, Geoff Canyon via use-livecode wrote:
> This doesn't solve the puzzle, but: use a stack property to store the value
> instead?
The value is entered correctly and displays after I dismiss the error dialog. I have finally
found where the issue is, but I don't know why it happens. The normal sequence is pretty simple:
1. Enter a search term and hit the return key on the virtual keyboard. This triggers the
inputReturnKey message.
2. InputReturnKey calls handler doSearch, which looks up the definition, populates a browser
widget on card 2, and goes to card 2.
What is happening is that inputReturnKey is being sent twice. The first time it works as
expected, but the second time we are already on card 2 and the controls on card 1 are no longer
available. Ergo, I get the "no such object" error. I found this by inserting "checkCd the
params" at the beginning of doSearch. CheckCd does this:
on checkCd pParams -- track inputReturnKey error
put pParams &cr&cr into tData -- the calling handler params
put the executionContexts after tData
answer tData
end checkCd
...and I got two dialogs in a row. I could see card 2 behind the second one, which was a debug
errorDialog instead of an answer dialog.
So the burning question is why does a single tap on the return key send two duplicate
inputReturnKey messages, and why does that happen only in a built standalone?
Maybe I won't embarrass myself if I enter a bug report now.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list