ask/answer dialog weird issue: a solution

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
rmuzzini
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 58
Joined: Mon Oct 08, 2012 11:30 am

ask/answer dialog weird issue: a solution

Post by rmuzzini » Fri May 18, 2018 3:34 pm

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…

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5428
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: ask/answer dialog weird issue: a solution

Post by dunbarx » Fri May 18, 2018 8:29 pm

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

mrcoollion
Posts: 322
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: ask/answer dialog weird issue: a solution

Post by mrcoollion » Sat May 19, 2018 8:54 am

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2209
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: ask/answer dialog weird issue: a solution

Post by jmburnod » Sat May 19, 2018 9:33 am

Hi,
Works fine for me (LC 9.0.0, OS X 10.13)
Jean-Marc

Post Reply

Return to “Mac OS”