On Fri, 24 Sep 1999, Scott Rossi wrote:
> >>repeat until the mouse is up
>
> >I'm sure I sound like a broken record here, "repeat until
> ><event>" is not the best way to do things like this. Use the
> >mouseMove message instead. Response will be much better, and load on
> >the system much lower. See the graph-node-dragging example in the
> >Examples stack for details.
>
> Scott, many thank you's for that playing that old tune once again. I
> seem to have fixed an intermittent stack dragging problem I has having.
> I'm not sure which example stack you were referring to, but I made a
> guess that the basic code concept is to allow dragging of an object by
> testing if the mouse is down within an 'on mouseMove' handler. Is that
> the right idea? It works over here...
Basically. Even better is to avoid the functions that query the
keyboard and mouse state entirely by trapping the mouseDown, mouseUp,
and mouseRelease messages (the latter is sent when the mouse button is
released while the cursor is outside the object it went down in).
They're not so bad on Windows and Mac, but are very expensive calls on
UNIX systems. Unfortunately you can't avoid using the keyboard-state
functions (shiftKey, optionKey, controlKey, commandKey) on MacOS
because the OS doesn't send messages when the state of these things
changes. You can trap theses things with rawKeyDown message handlers
on Windows and UNIX, though.
Regards,
Scott
> Thanks & Regards,
>
>
>
> __________________________________________________________________
> Scott Rossi Tactile Media - Multimedia & Design
> Email: [EMAIL PROTECTED]
> Web: www.tactilemedia.com
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...