MouseDown sent to button in group, but MouseUp sent to card

Monte Goulding monte at appisle.net
Thu Aug 3 16:16:46 EDT 2017


> On 3 Aug 2017, at 10:54 pm, dunbarx via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Note: If there is no mouseWithin handler in the target object's script, no
> mouseWithin message is sent, even if there is a mouseWithin handler in an
> object that's further along the message path.
> 
> Why this should be so is a mystery, but maybe someone from the team will
> chime in.

This is the case with the idle handler as well. These are very inefficient and would basically bog down the message path if they traversed the it for every object on every cycle. They probably should be deprecated.

A better mouseWithin would be something like this:

local sMouseWithin = false

on mouseEnter
   put true into sMouseWithin
end mouseEnter

on mouseLeave
   put false into sMouseWithin
end mouseLeave

Or just handle mouseMove instead of mouseWithin.

Cheers

Monte


More information about the Use-livecode mailing list