Re: hilited button

Scott Raney ((no email))
Tue, 22 Jun 93 18:52:20 MDT

>
>
> > From: pothiers@aries.saic.com (Steve Pothier)
>
> > Has anyone found a particularly good way of getting notification for
> > each button in a radio group that gets UNhilited?
>
> > I frequently have to do some cleanup for all buttons that become
> > unhilited. Would be nice if I didn't have to loop through all radio
> > buttons in a group especially given that the "Radio Behavior" property
> > does most of what I need.
>
> The only possible solution that I can see is to save the currently selected
> button for each radio group to a global, and then to trap for the mouseUp
> message in each group's script. The new radio selection would be saved
> before exiting the script.

Another possibility is to store the old state in a mouseDown handler
(be sure to discount the hilite of the target). If you're using
1.3Ax, this would be a good situation to use a local declaration in
the group's script rather than a global.

> Have you noticed the behavior of the hilitedButton property under these
> circumstances? In going from a "higher" radio option to a "lower" one,
> the property is updated before your handler is called. When going from
> a "lower" option to a "higher" one, the property isn't updated until after
> your handler is exited.

Don't count on this behavior, as it has been changed for 1.3A4. The
enforcing of the radio behavior will be done *before* the mouseUp
message is sent from then on.
Scott

> Boyd
>
>

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************