grabber in Rev (was PDF)
pixelbird at interisland.net
Fri Mar 5 13:29:44 CST 2004
> Date: Fri, 5 Mar 2004 09:27:13 -0500
> From: Chris Condit <ccondit at geo.umass.edu>
> Subject: grabber in Rev (was PDF)
> Hi List (especially Ken N. and Brian Yennie)-
> I noticed in Rev list V. 6 Issue 38 Ken N. & Brian Yennie traded info about:
> "and plugged the
> *genuine* Rev-style mouseMove grab/scroll handlers into the image script.
> It works beautifully. Grab/scrolls like its on bed of ball bearings. No
> problems, no joke."
> Is this an new thing, like the old SuperCard "grabber"? -
No. Rev has a 'grab' command, but it's basically useless because you can't
run anything of value with it, IOW, there is no way to program it to
constrain movement or define limits or anything else you would need to do
with a grab command.
> I didn't think Rev 2.1.2 had any grabber capability.
> I don't see any info in it with the rev doc included with the application.
Look up "grab" in the dictionary. Not that it will do any good for you (see
> I have a "fake" grabber, buy would sure like areal one., so I could
> simplfy that code
Right. What I meant was in comparison to old HC-style code that works like:
repeat until the mouse is up
...which hogs the processor.
Since you can't constrain movement with Rev's 'grab' command, the real Rev
way to do these things is in a mouseMove handler. Here is the tested and
working example script of the image of my map-scrolling test group:
put item 1 of mouseLoc() into gTX
put item 2 of mouseLoc() into gTY
set the allowMove of me to true ## automatically creates a custom prop
on mouseMove x,y
if the allowMove of me then
set hScroll(group id 1007) to hScroll(group id 1007)+(gTX-x)
set vScroll(group id 1007) to vScroll(group id 1007)+(gTY-y)
put x into gTX
put y into gTY
set the allowMove of me to false
> Also is there a 4000 pixel limit and does that apply to both length
> and width, does anyone know?
I dunno. I didn't know _what_ it applied to until Tom sent the latest PDF
conversion of the map in question to me. He reports that one of the hi-res
conversions came out to a height of 5100 pixels and displayed garbage, if
More information about the use-livecode