martin at atwork.bdx.co.uk
Mon Feb 25 14:04:01 EST 2002
>>Has anybody scripted drag-reordering of lists?
>Bruce Lewis wrote:
>The following is my technique for reordering in HyperCard and also for
>moving from field to field on a single card....
Thanks for your script Bruce, it got me thinking, though isn't quite the
same thing that I was thinking of since it is also for dragging a line from
field to field, and I want to drag a line (only) within the original field,
with the drag selection constrained.
>I imagine this will work in Revolution, but no doubt it can be done much
Not as easy as you'd think, in fact it has me beat so far. Rejecting the
grab command because it couldn't be constrained, I tried to implement a
similar thing by using rev's mousemove message. Dragging a rect as a
selection outline (I added a nice insertion line as well) and constraining
it to the field worked nicely, but though I've tried to get the field to
scroll in the way I need, I'm defeated on that in the end I think.
It seems that a revolution listfield (with "autohilite" "listbehaviour" +
"click to toggle" checkboxes all true) wants to scroll the hilited line to
the vertical centre of the field, at all times, and of course that's really
undesirable here, I want it to stay where it was when I clicked it, unless
I'm actually dragging and the field needs to scroll to bring other lines
into view, which is what I'm used to in HC, windowscript, and in fact all
other mac apps that let you 'peel off' a line from a scrolling field.
Sigh... if I anybody knows a way to subvert this "feature"...
Because of the built in behaviours of a list field I also found that I had
to take control of line hiliting myself (I wanted the clicked line to
hilite and stay that way when I dragged). Scrolling and mousemove didn't
really go together very happily because a) no scrolling occurred when the
mouse was moved above or below the field and b) if I tried to take control
and do it myself, the field fought back to force the selected line dead
I had a brief look at turning off list behaviour and so on, and doing
everything by hand, but after some fruitless minutes I remebered that I'm
using revolution because alas, I don't have the time to get into that kind
of thing, and so at that point I admitted defeat and gave up ;-)
>I use several HyperCard windowscripts in the same stack, but was not aware
>of the functionality you referred to.
It's true that like several useful things in WindowScript the "drag"
setting is a little bit hidden, being in the same popup as the
single/multiple/contiguous 'selection options' for a listfield, not perhaps
where you would intuitively look for it.
m a r t i n
martin baxter Cambridge UK
More information about the Use-livecode