Force interrupt

Richard Miller wow at together.net
Fri Jan 12 12:20:28 EST 2007


Here's the problem I'm trying to address. I'll do my best to explain  
it, even though it doesn't make a lot of sense to me.

We have a rather complex stack with almost 100 substacks. We're  
testing this app on several Windows machines. On many of the test  
units, the program runs fine. Never a problem. On some, though, the  
program comes to a halt at certain places. It sits there, with the  
cursor busy (the cursor had been previously set to busy), and will  
not proceed until I hit "command-period". The program then proceeds  
perfectly normally.

The problem is that this "bug" is mostly random. It never happens on  
some computers, and when it happens on others, there's no telling  
exactly when and where it will occur.... though it will only occur in  
3-5 possible places. I'm continuing to search for the source of this  
issue, but it's like a ghost.

An easier solution would be to have a script that is triggered at  
certain key places which checks to see if the cursor remains stuck in  
a busy position for too long. If that happens, I want to send an  
interrupt to the stack, just like I do via keyboard.

Any more thoughts on how to do that? Again, the problem isn't with  
finding out the software is "stuck" busy (I know how to do that), but  
telling it to interrupt whatever it's doing and simply continue.

Thanks.
Richard



On Jan 12, 2007, at 12:00 PM, Stephen Barncard wrote:

> I think part of the problem is that your scripts are "blocking".  
> Rev is not multitasking really, but it can be simulated using "with  
> messages".
>
> Can you put a script in the button that would just print some text  
> to the msg box? Test it without the script running. Then try it  
> with the script running.
> if it doesn't print, then it's blocking.
>
> cmd-period isn't something you want an end user to use from a  
> button, usually.
>
> anyway, you could probably make this work, but you'd have to  
> rewrite stuff.
> check out the 'Message Mechanics' stack for an explanation.  
> (somebody help me here).
>
> sqb
>
>> Thanks Steve, but I couldn't get your suggestion to work. Sounded  
>> like a good idea, though. Here's an example of what I'd like to  
>> have happen.
>>
>> Script of btn 1:
>>
>> on mouseup
>>   repeat with i = 1 to 10000
>>      put i
>>      if i = 200 then tryit
>>   end repeat
>> end mouseup
>>
>> on tryit
>>    ---do something here that stops the repeat loop from running
>> end tryit
>>
>> Here's the tough part... I can't know in advance where the running  
>> script is originating. I simply know something is running  
>> somewhere in my stack, and whatever it is, I want to abort it via  
>> script control.
>>
>> Thanks.
>> Richard
>
> -- 
>
>
> stephen barncard
> s a n  f r a n c i s c o
> - - -  - - - - - - - - -
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list