Trying to understand the inner workings of Resizestack

Mark Waddingham mark at livecode.com
Tue Mar 15 04:51:27 EDT 2016


On 2016-03-15 00:32, Paul Dupuis wrote:
> However, as of LiveCode 6.7.6, resizeControl is not sent to a disabled
> control when it's rectangle is changed. This is in keeping with 
> messages
> not sent to disabled controls (like mouseDown, mosueUp, etc.) and yet 
> it
> seems like a bug to me since whether a control is disabled or not, you
> probably want to have it resize when the window is resizing.

I tried this in 6.6.2 and the behavior was the same - if the group is 
disabled then no resizeControl message is sent. The current behavior 
(which appears to have remained unchanged forever) is that if the engine 
sends a message to an object via the 'normal' code path then if the tool 
is browse and the object is disabled then the message is passed 
immediately.

This affects all the event related messages, as well as things like 
resizeControl, openControl, closeControl. It does not affect set/get 
prop messages though.

> I have not checked to see if resizeControl not being sent to disabled
> controls was ever entered as a bug or whether it is still an issue in
> LC7 or LC8.

As mentioned above, this behavior does not seem to have changed in a 
long time so it is odd that you should notice problems in your app 
between pre-6.7.6 and 6.7.6.

Is this a bug? Yes - I think so.

The way the engine code is currently structured for disabled controls 
means that they should never receive mouse/focus related messages anyway 
(i.e. they should never be sent in the first place) as disabled controls 
don't participate in hit testing for mouse events and they are skipped 
over for keyboard focus events. (There's a whole other question here as 
to whether that is actual the best way to work as I suspect it is a 
side-effect of the 'action' of various UI elements in LiveCode being 
tied to mouse messages - i.e. you get mouseUp when a button has been 
clicked upon rather than an explicit 'action' type message).

Anyway, I couldn't find any report of this in the quality center so I 
filed it here: http://quality.livecode.com/show_bug.cgi?id=17123

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list