[comp.sys.mac] buttons in Hypertalk

franka@mntgfx.MENTOR.COM (Frank A. Adrian) (09/15/87)

>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?

Here is what I did for a similar requirement:

	on mouseEnter
      if the name of target contains "button" then
         set hilite of the target to true
      end if
	end mouseEnter

	on mouseLeave
      if the name of target contains "button" then
         set hilite of the target to false
      end if
	end mouseEnter

Now for a couple of my own questions:

1) Anyone know how to tell if "ask" is answered with "CANCEL" vs. "OK" and
an empty response?

2) Anyone got any ideas for performance analysis in hypertalk?  I would like
to know what handlers and functions to put my time into optimizing and what
good xcmd and xfcn candida tes might be.


And a request:
In the script editor I would really like a field with a list of the handlers 
and functions that the script contains that I could point to and go there.  
While I am at it I would also really like UNDO, but that is so obvious as to
not need stating, I guess.