Page 1 of 1

ask/answer dialog weird issue: a solution

Posted: Fri May 18, 2018 3:34 pm
by rmuzzini
i post this to give help if anyone in the future will bang his head against the same issue. as occured to me.

a weird thing.
i had a stack, created with lc7, then updated in the last years using lc8.
today i opened it with lc9.
in development mode all works as expected.
i compiled a binary for macOS.
i run the app and… "what the…?!" any dialog window (ask, answer) did not pop up. no error throwed. simply, the commands did not work.
i reopened the same file with lc8, i compiled it, i run the app and all worked as expected, every dialog popping up.

even weirder thing: i made a brand new, empty stack with lc9.
i just put a simple btn on cd 1 with

Code: Select all

on mouseUp
	ask "what?"
	answer it
end mouseUp
i compiled it.
i tested the app and nothing happened: no dialog appeared.

i told myself "time to file a bug to quality.livecode.com"
i reopened the file with lc9 and i simply changed some pref strings, i.e. the name of the app (from "untitled" to "test-dialog"), the name of the stack (from "untitled" to "main"), the bundle identifier. that sort of things…
i compiled it again.
i run it and… "what? now it is working?! why?!

no way to reproduce again the issue.

therefore, i started to do dozen of tests (several dozen…) using my old file. firstly, i tried to delete substacks. then i deleted cards. then i deleted scripts. then objects (at some point it seemed the culprit were some dataGrids). every time, after some changes, suddenly the binary started to work as expected. apparently with no direct link to what i had just modified. sometimes i tried to compile the app twice without changing the file: the first SA was broken, the second one was ok.
after around 30 attempts, LC gave me an error on compiling, a very long one:

Code: Select all

"There was an error while saving the standalone application
87,1776,8
69,1776,8
69,1776,8,field id…
and so on.
then it gave me the same after other 20 attempts or so.
randomly.

finally, i played that card from late 90s:
TRASH THE PREFs.

and now this issue seems to be fixed…

Re: ask/answer dialog weird issue: a solution

Posted: Fri May 18, 2018 8:29 pm
by dunbarx
This is likely the best advice one can give, after what I call "there is no way my code is at fault here".

It usually is, of course.

Craig

Re: ask/answer dialog weird issue: a solution

Posted: Sat May 19, 2018 8:54 am
by mrcoollion
Just for references.

I am working on Windows 10 and have no problems when I made a brand new, empty stack with lc9 and put a simple btn on cd 1 with

Code: Select all

on mouseUp
	ask "what?"
	answer it
end mouseUp
Might be a Mac related issue?

Regards,

Paul

Re: ask/answer dialog weird issue: a solution

Posted: Sat May 19, 2018 9:33 am
by jmburnod
Hi,
Works fine for me (LC 9.0.0, OS X 10.13)
Jean-Marc