Why Does this Behavior Fail?
Sivakatirswami
katir at hindu.org
Wed Nov 17 18:51:23 EST 2010
goal:
I would to put help info in custom props and then call these
automatically into display as the user pass his mouse over controls (on
a preferences card)
A preference might be a check box whose name is
button: __ autoMountServer type: check box
If I put this script into directly into the check box, it works, but if
I move the script to another card named "GrappleBehaviors" and name
that button: "Show Prefs Info"
whose long id is: button id 1437 of stack "Grapple"
and then set the behavior of button "autoMountServer" to "button id 1437
of stack "Grapple"
with this script (below)
it does not work. Initially I had "this card" and I thought that was the
problem, but even after full explicit references to the preferences
card, it does not respond.
on mousewithin
put format ("set the htmltext of fld \"prefsInfo\" of card
\"preferences\" to the u" & (the short name of the target) & " of card
\"preferences\"") into pInfoProp
do pInfoProp
show fld "prefsInfo" of card "preferences" with visual effect
dissolve very fast
end mousewithin
on mouseleave
hide fld "prefsInfo" of card "preferences" with visual effect
dissolve very fast
end mouseleave
Any clues?
obviously the goal is to avoid pasting this into *all* the controls on
the preferences card... I might also like to change the way of
displaying the info from a field on the card to a modal substack... a
behavior I can apply to all the controls is obviously best.
TIA
More information about the use-livecode
mailing list