1 Mar 2002 03:32
Re: Mouse polling answers for Scott
At 1:52 PM -0800 2/28/02, Geoff Canyon wrote: >At 12:05 PM -0700 2/27/02, Scott Raney wrote: >>Can someone please verify this? We've had two anecdotal reports that >>SC does *not* work this way. Running Geoff's example script will >>clear up the issue once and for all I think. > >I tested SuperCard 3.5.1 with the following script: > >on mouseUp > repeat with i = 1000 down to 1 > put i > end repeat > put the mouse >end mouseUp > >If you click the button, the numbers run by, and the message box ends up with "up" -- so far so good. > >If you click the button, then do a half-click -- press and hold the mouse button -- the numbers run by, and the message box ends up with "down" -- this is also expected, and matches HC and Rev/MC. > >If you click twice, you get two possible behaviors, both of which differ from HC/MC/Rev. > > -- If the second click is outside the button, then the appropriate word is displayed at the end of the countdown -- down if the mouse button is depressed, up if it is not. You can click as many times as you like outside the button, only the actual state of the button at the end of the countdown is reflected. > > -- If the second click (while the counter is running) is on the button, the button does a second mouseUp when it finishes the first. The word "down" or "up" correctly flashes by as SuperCard goes back to counting down from 1000. In fact, you seem to be able to queue as many mouseUps as you like -- click on the button five times quickly, and the counter will then proceed through five countdowns. At the end of each countdown, the(Continue reading)
on keyDown theKey
put the cMaxChars of the target into maxC
put the cMaxLines of the target into maxL
-- check to see if this object has the right properties
-- if not, just pass the keyDown without checking constraints
if maxL is empty or maxC is empty then pass keyDown
-- if you are using the starter kit, the next three lines
-- can be merged into one, it just looks messier.
put word 2 of the selectedLine of the target into theLine
put the value of the selectedLine of the target into theText
if the length of theText >= maxC or theLine > maxL then
beep
exit keyDown
else
pass keyDown
end if
end keyDown
Cheers,
Sarah
> Sarah,
>
> Thank you so much for the quick response.... This actually works quite well
> and is a great example, thank you!.... I do have one more question though,
> this is more out of curiosity I suppose... Is there some way to store the
> "constraint" information as part of the field definition and make this a
> function which gets called?.. THe reason I ask is because I have to do this
> with about 150 different fields and it would get rather tedious to be cutting
> and pasting for each one of them.....
>
> Again, thank you very much for your help -- I really *REALLY* appreciate
> it....
>
> Greg Saylor
> Senior Systems Integrator
... of course the "wait {N time} with messages"
> will wait the time you define while allowing other actions, and is not
> accelerated by those actions, whereas "wait {N time}" simply waits. None
> of this makes "wait for messages", apparently meaning a random time up
> to half a second, very useful ... so far.
>
> regards
> David
RSS Feed