Answer Dialogs Not Working in Standalone

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Answer Dialogs Not Working in Standalone

Post by stephenmcnutt » Wed Oct 03, 2018 9:26 pm

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.

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

Re: Answer Dialogs Not Working in Standalone

Post by dunbarx » Wed Oct 03, 2018 9:55 pm

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

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by stephenmcnutt » Wed Oct 03, 2018 10:04 pm

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.

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

Re: Answer Dialogs Not Working in Standalone

Post by dunbarx » Thu Oct 04, 2018 2:04 pm

Hmmm.

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

Craig

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by Klaus » Thu Oct 04, 2018 2:06 pm

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

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by stephenmcnutt » Thu Oct 04, 2018 4:35 pm

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.

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by Klaus » Thu Oct 04, 2018 10:19 pm

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

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by stephenmcnutt » Fri Oct 05, 2018 5:18 pm

Doing a clean re-install of macOS did the trick. I suspect completely uninstalling and reinstalling LiveCode might have fixed the problem, too.

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by stephenmcnutt » Sat Oct 06, 2018 5:37 pm

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.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by SWEdeAndy » Sat Oct 06, 2018 5:47 pm

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...
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by SWEdeAndy » Sat Oct 06, 2018 7:14 pm

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... :|
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

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

Re: Answer Dialogs Not Working in Standalone

Post by dunbarx » Sun Oct 07, 2018 5:04 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by jacque » Sun Oct 07, 2018 6:52 am

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by SWEdeAndy » Sun Oct 07, 2018 6:19 pm

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... :(
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Answer Dialogs Not Working in Standalone

Post by jacque » Sun Oct 07, 2018 8:03 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Talking LiveCode”