On 9/2/01 9:11 pm, Jacqueline Landman Gay at [EMAIL PROTECTED] wrote:
> I just had a similar experience which turns out to be a bug in MetaCard.
> If you have a button with a hiliteIcon set but no regular icon set, the
> hiliteIcon is not removed when you release the mouse. In other words,
> once you've clicked the button, it appears to be permanently in the
> "down" position until you change cards and go back again (opening the
> card clears the hiliteIcon.)
>
> Until the bug is fixed, the solution is to assign either a non-existent
> icon number to the button as the regular icon (for example, assign it an
> ID of 3, which has no corresponding icon in MetaCard,) or assign a
> one-pixel transparent gif graphic as the icon. The danger with assigning
> a non-existent icon is that in the future those icon IDs may represent a
> real icon in MetaCard, and you will get an unexpected icon when running
> under those versions.
As an alternative, you could insert the following (untested) script into the
frontScripts on preOpenStack:
local lTarget,lCondition
on mouseDown
put the long id of the target into lTarget
if word 1 of lTarget is not "button" then pass mouseDown
put (the icon of lTarget is 0 and the hiliteIcon of lTarget is not 0) into
lCondition
if lCondition then set the showIcon of lTarget to true
pass mouseDown
end mouseDown
on mouseUp
if word 1 of lTarget is not "button" then pass mouseUp
if lCondition then set the showIcon of lTarget to false
pass mouseUp
end mouseUp
on mouseRelease
if word 1 of lTarget is not "button" then pass mouseRelease
if lCondition then set the showIcon of lTarget to false
pass mouseRelease
end mouseRelease
The above script would have the disadvantage that the display of the
hiliteIcon wouldn't track the mouse movement while the mouse is held down
and moved outwith the button (that could be added in if necessary). However,
you might find this a satisfactory temporary solution until the MC bug is
fixed. Then you could simply not insert these handlers. On the other hand if
you've just got a couple of buttons, one of the workarounds you suggested
would be better!
Cheers,
Alan
Alan Beattie <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (Formerly Cross Worlds Computing)
Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707.
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.