What are the differences between "cantAbort" and "allowInterrupts"? They appear in the Dictionary to be complements of each other, except that in their default settings of False would appear to conflict.
Thanks,
Walt
Differences between cantAbort and allowInterrupts
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Differences between cantAbort and allowInterrupts
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
The cantAbort property prevents you from interrupting running scripts in a specific stack, whereas the allowInterrupts property is global. Their default values are actually not contradictory: the cantAbort of a stack is false by default, and the allowInterrupts is [true by default - so you can break out of runaway scripts.
Personally, I prefer using allowInterrupts, setting it to false before a transaction and resetting it afterwards. And if I have a long loop, I'll regularly check the interrupt at safe points in the business logic. This way, I'm sure that everything that needs to be done as a block is done as a block.
Jan Schenkel.
Personally, I prefer using allowInterrupts, setting it to false before a transaction and resetting it afterwards. And if I have a long loop, I'll regularly check the interrupt at safe points in the business logic. This way, I'm sure that everything that needs to be done as a block is done as a block.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com