Command-Period not Stopping Scripts ...

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlasdairScottUK
Posts: 3
Joined: Sun Sep 24, 2017 10:24 pm

Command-Period not Stopping Scripts ...

Post by AlasdairScottUK » Mon Oct 18, 2021 4:52 pm

So I've been away from LC for a few releases. Back on it with 9-6-4 on my Mac and I'm noticing a few behaviours that seem way different.
First and foremost ... while a script is executing, Command-Period no longer seems to stop it.

Am I missing something here?

Thanks!

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

Re: Command-Period not Stopping Scripts ...

Post by jmburnod » Mon Oct 18, 2021 5:59 pm

Hi,
Did you check the allowInterrupts = true ?
Best regards
Jean-Marc
https://alternatic.ch

AlasdairScottUK
Posts: 3
Joined: Sun Sep 24, 2017 10:24 pm

Re: Command-Period not Stopping Scripts ...

Post by AlasdairScottUK » Tue Oct 19, 2021 2:18 pm

Good suggestion - however

Code: Select all

allowInterrupts = true
so that's not it.
Most odd - I've not noticed this behaviour on any previous release.

Thanks for the reply!
AX

AlasdairScottUK
Posts: 3
Joined: Sun Sep 24, 2017 10:24 pm

Re: Command-Period not Stopping Scripts ...

Post by AlasdairScottUK » Wed Oct 27, 2021 7:06 pm

Now upgraded to 9_6_5 rc2

Even the most simple button script is not terminated by Command-Period.

Is this expected behaviour?

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

Re: Command-Period not Stopping Scripts ...

Post by dunbarx » Wed Oct 27, 2021 10:55 pm

Hi.

This should not happen.

But here is something to check. If I have a button and a field 1, and this in the button script:

Code: Select all

on mouseUp
   repeat until the optionKey is down --just for safety
      add 1 to fld 1
      wait 1
   end repeat
end mouseUp
I usually cannot stop that handler with only a quick press of cmd-period. I have to hold it for just a bit. Is it possible that somewhere you have the same set-up?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Command-Period not Stopping Scripts ...

Post by FourthWorld » Thu Oct 28, 2021 12:32 am

AlasdairScottUK wrote:
Wed Oct 27, 2021 7:06 pm
Even the most simple button script...
What is that script?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Command-Period not Stopping Scripts ...

Post by AndyP » Thu Oct 28, 2021 6:00 am

dunbarx wrote:
Wed Oct 27, 2021 10:55 pm
Hi.

This should not happen.

But here is something to check. If I have a button and a field 1, and this in the button script:

Code: Select all

on mouseUp
   repeat until the optionKey is down --just for safety
      add 1 to fld 1
      wait 1
   end repeat
end mouseUp
I usually cannot stop that handler with only a quick press of cmd-period. I have to hold it for just a bit. Is it possible that somewhere you have the same set-up?

Craig
Hi Craig, in your test script the wait is blocking any messages, which is why you need to hold the keys down to give a chance for messages to be captured and acted upon. Your keys down messages only have a chance of being captured during the short period around the wait.

Try adding with messages to the wait

Code: Select all

Wait 1 with messages
Does that help?
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

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

Re: Command-Period not Stopping Scripts ...

Post by dunbarx » Thu Oct 28, 2021 2:53 pm

Andy.

That was my point, that the OP might have such a thing lurking in a handler somewhere.

Interestingly, I tried "with messages" with several wait times, and noticed no real difference.

Craig

Post Reply

Return to “Mac OS”