Page 1 of 2

Answer Dialogs Not Working in Standalone

Posted: Wed Oct 03, 2018 9:26 pm
by stephenmcnutt
In 9.0.1, My "answer" dialog boxes don't appear after the app is made into a macOS standalone. Example...

answer "Hi there" as sheet
or
answer "Hi there"

Both work fine in the IDE but not in the standalone. The sheet or dialog box never appears, and code execution for that handler stops. Well, maybe it doesn't stop. Maybe it's just waiting for me to click a choice in the answer dialog box that never appears.

I'm running the latest macOS, Mojave. I'm running LiveCode on the same macOS system as I'm running the standalone. I tried re-downloading 9.0.0, but that didn't work, either.

Re: Answer Dialogs Not Working in Standalone

Posted: Wed Oct 03, 2018 9:55 pm
by dunbarx
Hi,

Are you sure you included them in the "Standalone Settings"?

If you chose to add the inclusions manually, you may have missed these.

Craig Newman

Re: Answer Dialogs Not Working in Standalone

Posted: Wed Oct 03, 2018 10:04 pm
by stephenmcnutt
I've never added any inclusions manually before, but this sounds like a likely solution. No. Just checked, and I've got "Search for required inclusions..." selected.

Re: Answer Dialogs Not Working in Standalone

Posted: Thu Oct 04, 2018 2:04 pm
by dunbarx
Hmmm.

Try an experiment. Build the standalone by manually including the, er, inclusions, and see if the dialogs work then.

Craig

Re: Answer Dialogs Not Working in Standalone

Posted: Thu Oct 04, 2018 2:06 pm
by Klaus
Hi Stephen,

just made a quick test with LC 9.0.1 on macOS 10.14 and the ANSWER dialog works fine in a standalone with "Search for required inclusions...". So there must be something else going on on your machine.


Best

Klaus

Re: Answer Dialogs Not Working in Standalone

Posted: Thu Oct 04, 2018 4:35 pm
by stephenmcnutt
Thanks, Klaus. You've been a huge help over the years. I was hoping it would be something simple (for me) like a flaw in 9.0.1, but, like you said, it seems to be on my end. I haven't done a clean OS install in years, so I think I might do that--just start over with everything and see what's up. I might also send the standalone to a Mac friend and see if answer dialogs work for him. Yikes. I hate it when mysterious stuff like this goes wrong. Makes me queasy.

Re: Answer Dialogs Not Working in Standalone

Posted: Thu Oct 04, 2018 10:19 pm
by Klaus
stephenmcnutt wrote:
Thu Oct 04, 2018 4:35 pm
Yikes. I hate it when mysterious stuff like this goes wrong. Makes me queasy.
Welcome to the wonderful world of software development! :D

Re: Answer Dialogs Not Working in Standalone

Posted: Fri Oct 05, 2018 5:18 pm
by stephenmcnutt
Doing a clean re-install of macOS did the trick. I suspect completely uninstalling and reinstalling LiveCode might have fixed the problem, too.

Re: Answer Dialogs Not Working in Standalone

Posted: Sat Oct 06, 2018 5:37 pm
by stephenmcnutt
Nice detective work! I don't know if that indicates LC or macOS, but it's doubtless a clue.

Yeah I wansn't keen on reinstalling macOS, either, but I hadn't erased the drive since I bought the machine since I bought it five years ago. No telling what kind of scum had accumulated.

Re: Answer Dialogs Not Working in Standalone

Posted: Sat Oct 06, 2018 5:47 pm
by SWEdeAndy
Sorry, I just deleted my post as I discovered, right after posting, that it suddenly did not work. And then right after deleting the post, I got it to work in some stacks but not others. Now I'm (even more) confused...

Anyway, the detective work mentioned was this:

Code: Select all

on mouseUp
   try
      answer "Should work!"
   catch errorVariable
      put errorVariable into fld 1
   end try
end mouseUp
This produced the answer dialog in a clean stack standalone, with a minimum of inclusions (or auto), but not in a complex stack...

Re: Answer Dialogs Not Working in Standalone

Posted: Sat Oct 06, 2018 7:14 pm
by SWEdeAndy
After further testing, it seems the try structure had nothing to do with it. If the answer dialog works, it works, with or without try structure. Something must be up with the standalone settings - it almost seems random if I get a new stack to show an answer dialog or not. For complex stacks, with many inclusions, I never get it to work. So, some inclusions seem to "disturb" the answer dialog function (for some of us, but not most users...? :? .

Well, I need it to work reliably and now, so custom built answer dialog it is then... :|

Re: Answer Dialogs Not Working in Standalone

Posted: Sun Oct 07, 2018 5:04 am
by dunbarx
If you really believe that you have intermittent behavior that others do not, send the stack to QCC. We have to exterminate goblins wherever they appear.

Craig

Re: Answer Dialogs Not Working in Standalone

Posted: Sun Oct 07, 2018 6:52 am
by jacque
Using "search for inclusions" has missed some things in the past and isn't always reliable, so I never use it. I'd suggest using manual inclusions. Unselect the answer dialog, close standalone settings, re-open standalone settings, and then re-select the answer dialog (just to make sure that it was cleared and reset.) Then close standalone settings and save the stack.

I'm pretty sure the problem is the omission of the inclusion during the build.

Re: Answer Dialogs Not Working in Standalone

Posted: Sun Oct 07, 2018 6:19 pm
by SWEdeAndy
Indeed, I normally don't use "search for inclusions" either, just tried that too in this case to see if it made a difference (it didn't).

When manually selecting inclusions, the ask and answer dialog boxes are pre-ticked. I followed jacque's advice and unselected them, then closed and saved. Upon reopening standalone settings, the ask and answer dialog boxes are magically ticked again. So the deselecting of them doesn't stick! And building a standalone after this exercise gave the same non-functional result as before. (LC Business 9.0.1 rc 3)

Is it by design that the ask and answer dialog boxes cannot effectively be unselected in the standalone settings? And in any case, that shouldn't really cause the answer dialog not to function after build... :(

Re: Answer Dialogs Not Working in Standalone

Posted: Sun Oct 07, 2018 8:03 pm
by jacque
You're right, they're pre-selected, but I was hoping a re-trigger might fix it. At this point it sounds like something's gone awry in the standalone builder and probably needs a bug report.