I have run up against (created?) a catastrophic bug in my iOS build, which I cannot understand.
The answer dialog function has begun stopping the running of my code cold, after one execution. It begins doing this after running my initialization section (which does use the answer dialog command several times), and then is "idling" - waiting for execution of a variety of options via button clicks. At that point, the answer dialog queries the user regarding further options, and stops cold. The "it" variable is does not even populate with the response to the click in the dialog box. I get no error message trapped by any "on errorDialog" or "try/catch" method. I only tracked the point of failure down by inserting code sections before and after various "answer" commands to log messages into error log fields.
The error is not occurring when running the code in the IDE, only in the iOS build.
Has anyone ever run up against something like this? I have beat my head against this wall for a week or more, now. I can't fathom what weird code I could have placed in my app to create this behavior. It occurs with builds from LC 9.6.10 as well as LC 10.0.2.
answer dialog box failure in iOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: answer dialog box failure in iOS
You probably need to post some code. This sounds like it may be an inadvertent effect of your handler code and it may be easier to debug sharing it here...
Re: answer dialog box failure in iOS
I'm afraid the code around the answer dialog is quite mundane. I think the problem is somewhere else in the code (total code around 2000 or so lines), as the area where the problem is now occurring was not modified for weeks, while I worked on other sections. Here is the code where the problem occurs, however.
You see my temporary workaround, getting the OK without asking. I guess I may have to "roll my own" answer dialog, and move on.
Code: Select all
go cd 1
show img "imgPhoto"
--hide widget "spinner" of cd 1
put empty into pieceID
hide graphic "picture frame"
--answer "Use this pic?" & cr & "Click OK to start." with "Cancel" or "OK" --as sheet
get "OK"
if it = "Cancel"
then
put false into sDragging
hide image "imgPhoto"
answer "Do you want to choose another picture?" with "No" or "Yes" --as sheet
if it = "No"
then
exit to top
else
go cd "picture card"
exit to top
end if
end if