Article View: comp.sys.mac
Article #19099Re: Button hilighting in HyperTalk
From: Keith Rollin
Date: Tue, 15 Sep 1987 01:09
Date: Tue, 15 Sep 1987 01:09
44 lines
2299 bytes
2299 bytes
In article <1748@watcgl.waterloo.edu> kdmoen@watcgl.UUCP (Doug Moen) writes:
>I'm working on a HyperCard database intended to be used by people with
>no knowledge of computers or Macintoshes. I've found that causing
>buttons to highlight when the cursor moves over them makes the user
>interface much more intuitive.
>
>This turns out to be easy to do in HyperTalk. You simply include the
>following code in each button script:
> on mouseEnter
> set hilite of the target to true
> end mouseEnter
>
> on mouseLeave
> set hilite of the target to false
> end mouseEnter
>
>Here's my problem. I prefer not to edit the script of every single
>button in my database to add this code. I have tried putting the code
>into the stack script, where it will be inherited by every button in
>the stack. This works, but unfortunately, it also gets inherited by fields,
>which is not what I want. Any suggestions?
The function "target" returns a string that can be used to identify what object
is getting the system message. In the case of a button getting hit, "the target"
would contain something like "card button id <number>" or "bkgrnd button id
<number>". Check this string for the work button, and you're set.
on mouseEnter
if the second word of the target is "button" then
set hilite of the target to true
end if
end mouseEnter
--
Keith Rollin
Sales Technical Support
Apple Computer
Disclaimer: I read this board as a genuinely concerned Mac-Head. Any views
expressed are my own until my boss finds out what I'm doing.
However, that doesn't mean I can't recognize a good idea and
do something about it...
Technical Details
Message-ID:
<6231@apple.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!nsc!voder!apple!keithReferences:
<1748@watcgl.waterloo.edu>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!nsc!voder!apple!keith From: keith@apple.UUCP (Keith Rollin) Newsgroups: comp.sys.mac Subject: Re: Button hilighting in HyperTalk Message-ID: <6231@apple.UUCP> Date: Mon, 14-Sep-87 21:09:11 EDT Article-I.D.: apple.6231 Posted: Mon Sep 14 21:09:11 1987 Date-Received: Wed, 16-Sep-87 06:44:04 EDT References: <1748@watcgl.waterloo.edu> Reply-To: keith@apple.UUCP (Keith Rollin) Organization: Apple Computer Inc., Cupertino, USA Lines: 44