Re: button clicks

Phil Davis (phil_davis@MENTORG.COM)
Fri, 11 Apr 1997 09:22:07 -0700

I sent this to barney but not to the list the other day. I see it's still a
topic, so...

----------------------------
In-Reply-To: barney <barney@visicom.com>
"button clicks" (Apr 9, 10:27am)
X-Mailer: Z-Mail (3.2.1 10apr95)

On Apr 9, 10:27am, barney wrote:
> Subject: button clicks
> We have run across a button click problem that we have not yet figured
> out. Any suggestions would be greatly appreciated.
>
> If a user becomes impatient while waiting the couple secs it takes a
> page to load, and clicks the mouse button, each click is actually 'read'
> and the button action occurs. Hence, five extra clicks results in the
> next five pages being loaded before it stops.
>
> How can I fix it so MetaCard recognizes one button click, then disables
> that button until the next time I want the user to click on it. Is there
> such a command as enable/disable button function?

How about:

on mouseUp
disable me
<load the page>
wait until <the page is loaded>
enable me
end mouseUp

I assume you're reading a page into a field, so (if the field is meant to
contain only the one page) you could wait until the field is not empty.

There are other ways to do it that might be better. This way affects the
appearance of the button while the page is loading. Maybe you could do
something like:

on mouseUp
send "loadPage" to this cd
end mouseUp

on loadPage
put empty into <your field>
<load page into field>
wait until <the field isn't empty>
repeat until the pendingMessages is empty
cancel item 1 of the pendingMessages
end repeat
end loadPage

WARNING: I haven't tested anything here.

Hope this helps.

-- 
Phil Davis
Information Synthesis, Inc.
--------------------------------------
phild@infosynth.com     (503) 685-0306