dragging 2 windows in synch

Ken Norris (dialup) pixelbird at interisland.net
Wed Sep 1 15:02:56 EDT 2004

Hi Ken and Scott,

> Date: Tue, 31 Aug 2004 21:56:03 -0500
> From: Ken Ray <kray at sonsothunder.com>
> Subject: Re: dragging 2 windows in synch

> On 8/31/04 9:34 PM, "Scott Morrow" <scott at elementarysoftware.com> wrote:
>> Hello,
>> Is there a technique to maintain the relative location of a secondary
>> stack while dragging the primary stack.  I'm not looking to just update
>> the window location after the move has completed but to visually  drag
>> it along with the window that the user is moving.  I'm building
>> routines for simulating drawer behaviors outside of OSX.
> Well, if it's for OS 9, you're probably out of luck unless you make your own
> custom windows and your own drag regions. The reason is that the moveStack
> message isn't sent until *after* you release the mouse on the Mac.

Well, actually it should work under OS 9 because the windows "ghost" when
you move them, i.e., you aren't moving the real window, like you are with
OSX and Windows XP. That means both should reappear together. AFAIK, it's
Mac OSX that simply won't work with the moveStack message because of the
reasons you site.

The only other way to make it work is via continuous window relocation
script that uses globalized mouseMove coordinate offsets. It won't be as
smooth, but on todays fast Macs and fast video, it ought to be somewhat
acceptable. I have a routine that does that, but not on this machine. I have
to get to the studio to look it up. Or, since it's not rocket science, you
can probably figure it out reasonably quickly. I'd suggest doing all the
maths you can up front, i.e., establish the window offsets at mouseDown, and
use small 1 or 2 letter variable names. Everything counts when you need your
routine to run fast, but most of it depends on screen redraws as you 'drag'.

If someone else doesn't come up with it beforehand, I'll find the example
and post it, but I gotta go.

owever, I also wish for a way to move multiple stack windows simultaneously
without running a script routine. And real Drawers, too, for that matter.

Ken N.

More information about the use-livecode mailing list