Help message Broadcasting system
J. Landman Gay
jacque at hyperactivesw.com
Thu Feb 11 17:53:04 EST 2010
Jeff Massung wrote:
> Instead, what about just having a background message loop processing that's
> always checking the current focus target and displaying the help text for it
> (if that option is enabled). For example:
<snip>
Good approach, that. I'd use a built-in message in the engine instead
though, it's shorter.
In the stack script (or whatever script is in the hierarchy for all the
relevant objects):
on mousemove x,y
put the helptext of the target into fld "help field"
end mousemove
Then make a custom property called "helptext" for any object that needs
to display it.
This handler will automatically empty the helptext field when
appropriate, because if a custom property doesn't exist in an object,
its value is returned as empty. One advantage to the above is that you
don't need any loops or messaging. One disadvantage is that you have to
remember to pass the mousemove message if any of the controls also use
it, but that's minor.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list