Tim Hart wrote:

> 
> On Thursday, February 27, 2003, at 04:47 PM, Richard Gaskin wrote:
> 
>> Ctrl-. (Win) or Cmd-. (Mac).
> 
> Thanks.  Now how do I do that with a button labeled "reset" so the user
> can do it to.

That's not so easy.  I did it once for WebMerge, and maybe there's a simpler
way but my method ate a lot of clock cycles.

I called a function in my repeat loop that checked the mouseLoc, and if it
was over the Cancel button it turned the cursor from watch to hand.  Then it
checked if the mouse was down, and if so it sent a "mouseUp" to that button.
With the overhead of event polling, this dragged my app's performance down
dramatically.

In a later version I simply removed the button and replaced it with a note
for the user to type Ctrl-. to cancel, and commented out the function call:
My app was now much faster, and not a single user has ever even noted the
change, other than to express their appreciation for the speed increase.

Anyone have an efficient way of implementing a Cancel button from within a
loop?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 [EMAIL PROTECTED]       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to