realbasic-nug
[Top] [All Lists]

Re: Wrong Canvas.MouseUp Event?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Wrong Canvas.MouseUp Event?
From: Joe Strout <joe@inspiringapps.com>
Date: Thu, 30 Apr 2009 08:37:59 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <p06240800c61f61e86476@[10.0.1.8]>
Organization: Inspiring Applications, Inc.
References: <49F9709D.5080107@helios.de> <p06240800c61f61e86476@[10.0.1.8]>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
Joe Huber wrote:

Now click the canvas and drag the mouse outside of it. Then release the mouse key. I think there should be no MouseUp Event because the mouse is not released _inside_ of the Canvas area.
Tested on Mac and Win XP.

This looks like a bug for me. Comments please.

IMHO The current behavior is the most flexible. It allows you to easily detect a mouse up either within or outside the canvas. Since it has behaved this way for so long and since it's the most flexible approach, I'd suggest that the docs be changed to reflect the actual behavior.

IMHO It's only a bug with the documentation.

I strongly agree. In typical usage, you change state on MouseDown -- you're in some mouse-tracking state (making a selection ring, dragging an object, whatever). MouseUp is where you leave that state, and it's important to do that, regardless of whether the mouse is inside or outside the control at that point. If you want to take different behavior depending on whether the mouse is inside or outside, well, that's very easy to test.

Best,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>