One way to do this if you can is to move the looping portion/s of your current 
handler to a separate handler that loops using "send in", along with a variable 
check.  Something like 

local allowMonitor
command monitorProcess
  if allowMonitor is false then exit monitorProcess
  do monitor stuff
  send "monitorProcess" to me in 50 millisecs
end monitorProcess

When the user presses your cancel button, change the value of allowMonitor to 
false.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design

> On Mar 29, 2014, at 2:43 AM, Nakia Brewer <nakia.bre...@westrac.com.au> wrote:
> 
> Hi,
> 
> Is there a way u can kill a handler that is currently running (has long loops 
> on it so runs a while).
> 
> I am building a desktop version of the mobileActivity indicator and want to 
> add a cancel button so it can cancel any current operation within the 
> program...
> 
> 
> 
> Sent from my iPhone
> COPYRIGHT / DISCLAIMER: This message and/or including attached files may 
> contain confidential proprietary or privileged information. If you are not 
> the intended recipient, you are strictly prohibited from using, reproducing, 
> disclosing or distributing the information contained in this email without 
> authorisation from WesTrac. If you have received this message in error please 
> contact WesTrac on +61 8 9377 9444. We do not accept liability in connection 
> with computer virus, data corruption, delay, interruption, unauthorised 
> access or unauthorised amendment. We reserve the right to monitor all e-mail 
> communications.
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to