presumably the card click function could complete much faster than you can
click a mouse.  So your semaphore can work perfectly well and it would still
look like the card were clicked twice.  I couldn't make a recommendation on
what to do without more context on what you are trying to do.

On Tue, Nov 18, 2008 at 1:11 PM, Jonas Elfström <[EMAIL PROTECTED]> wrote:

> On Tue, Nov 18, 2008 at 7:55 PM, Jonas Elfström <[EMAIL PROTECTED]> wrote:
> > If this doesn't stop card_click from being called twice in case of a
> > double click on the image then what does?
>
> And neither does this:
>  semaphore = Mutex.new
>  m.image=image @back_image, :click => proc {
>    semaphore.synchronize { card_click(m) }
>  }, :width=>320, :height=>240
>
> Now it's getting strange!
>
> --
> Jonas Elfström
>

Reply via email to