I need some DataGrid performance help
mark at livecode.com
Wed May 6 13:53:21 EDT 2020
On 2020-05-06 17:36, Richard Gaskin via use-livecode wrote:
> A while back Mark Waddingham reviewed the situation and decided that
> getProp and setProp were indeed more rightly in the category of custom
> messages rather than system messages, and as such should ideally be
> immune to the effects of "lock messages".
If by a 'while back' you mean the thread from 2013 in the engine forum
(http://forums.livecode.com/viewtopic.php?f=66&t=18048) then that's a
long time ago! If I have commented more recently on this, then a
reference to what I said would help :)
In reality if you want encapsulated custom controls which cannot be
broken by user scripting around them, then it is not just property
handlers which should be immune to lock messages, all engine messages to
such a custom control should be immune.
Even discounting the 'life-cycle' events which behaviors on groups get
(e.g. openControl, closeControl, resizeControl) as being similarly
special (to property messages), custom controls can rely on reliable
receipt of normal engine messages too.
e.g. You have a nice button custom control, it manages a hover state. It
requires mouseEnter / mouseLeave events for that to function. If
messages are locked then in certain cases, it might get into an
inconsistent state because it does not get a matching pair.
Regardless of what I said 7 years ago, now (being older, and maybe a
little wiser) I don't think I really see how changing lock messages (and
breaking a lot of code as a result!) would get us any further towards
better custom controls would it?
In reality, 'lock messages' is a sledge-hammer and like a sledge-hammer
it can cause fallout if not wielded carefully.
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode