Article View: comp.sys.mac
Article #19544HyperTalk mouseUp message
From: 39clocks
Date: Sun, 27 Sep 1987 04:35
Date: Sun, 27 Sep 1987 04:35
55 lines
3887 bytes
3887 bytes
After reading the truly lucid description of the concept of messages or
"HyperTalk" in the HyperCard Script Language Guide, I thought I understood what
was going on well enough to try to implement pulldown menus in HyperCard. I
started by drawing a menubar below Apple's menubar, typed in a few menuNames,
put invisible buttons over them and then created the dropdown portions of the
menus with shadowed buttons. I created a script for the first menuName button
that would show the buttons below it on a mouseDown and make them invisible
on a mouseUp. In the same script is a message handler for mousestilldown
which keeps track of the vertical position of the cursor in such a way that
the menuitems are hilited when the cursor passes over them.
This all works quite well, although it is a little bit slow, however there
is one major problem: A menu is supposed to work by executing an action based
upon which menuItem was hilited when the mouse was released. I can't get this
to work, in fact, I cannot figure out what happens to the mouseUp message that
is supposed to be sent when the mouse is released.
The hierarchy of message passing in HyperCard is supposed to be from a
button or field > card > background > stack > home stack > HyperCard. So
to try to figure out where the mouseUp message was going to I placed mouseUp
handlers that put things like "card got it" into the message window into all
of the objects except the last two. I was a little disapointed when I
then clicked the mouse in a button, held the button down while moving the mouse
out of the button and then upon releasing the mouse found that none of the
objects received a mouseUp message. It seems that an object will only
recognize a mouseUp message if the mouseDown occured in in that object. Drag:(.
Has anyone else out there had similar experiences or figured a way to
implement pulldown menus?
For the record, I think that the HyperCard Script Language Guide that apda
is selling is just that, _A GUIDE_. It is definitely _not_ a reference which
what I was expecting. But for $19.95 plus $6.00 for shipping what can you
expect. A little more than the 3/8" document and diskette that you receive
which seems to have some errors. Take the example given for for MouseV on
page 10-7, mine reads:
if mouseV > 342 put "Stop" into msg
that's funny, to get this to work on my version of HyperCard I have to type:
if mouseV() > 342 then put "Stop" into msg or alternatively:
if the mouseV > 342 then put "Stop" into msg
There also does not seem to be any elaboration on what parameters are
possible for "set cursor" and "set dragspeed". If you experiment you can
find out that set cursor accepts the parameters "1","2","3" and "4", but
this is really something that should be in the documentation.
Enough complaining... the document does warn that it is preliminary, does
not include final editorial corrections, final art work, an index or glossary
and may not include final technical changes. That's for sure.
Peter Marinac
Technical Details
Message-ID:
<5236@jade.BERKELEY.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!jade!violet.berkeley.edu!39clocksShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!jade!violet.berkeley.edu!39clocks From: 39clocks@violet.berkeley.edu.UUCP Newsgroups: comp.sys.mac Subject: HyperTalk mouseUp message Message-ID: <5236@jade.BERKELEY.EDU> Date: Sun, 27-Sep-87 00:35:38 EDT Article-I.D.: jade.5236 Posted: Sun Sep 27 00:35:38 1987 Date-Received: Sun, 27-Sep-87 21:50:15 EDT Sender: usenet@jade.BERKELEY.EDU Reply-To: 39clocks@violet.berkeley.edu (Peter Marinac) Distribution: world Organization: University of California, Berkeley Lines: 55 Keywords: mouseUp,hypercard,hypertalk,apda,script language guide Summary: were did the mouseUp message go?