Enable/disable Group enables/disables all children

Bob Sneidar bobsneidar at iotecdigital.com
Fri Apr 27 13:23:04 EDT 2018


> On Apr 27, 2018, at 10:04 , Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> You can't tell what the state of disabled was of a child before the owning group's disabled property is set - that's the problem.
> 
> Imagine we change this without any regard for backwards compatibility to the preferred (correct!) model. Then when you open your stack, setting the 'disabled' of a group to 'false' will then *only* affect the disabled property of the group - not the children. All the children will remain with disabled 'true' (as it won't be setting the property any more on children).
> 
> This means that everyone would have to go through every card of every single stack which has groups which are disabled, which contain children which should be enabled/disabled with the group's enablement and change those child controls disabled property to false (as they will be true at present).


Unless disabling a group prevented you from interacting with any of the children without actually disabling the children. One scenario you have to disable all the children, the other you have to re-enable them based upon a prior state saved in some fashion. As I said, darned if you do, darned if you don't. One leg is both the same. :-)

But it's okay, I can script around it. I'm more interested in a detailed single file function, but again I can work around that too. I will just filter the detailed files of the enclosing folder and hope that in the distant future someone doesn't try to use this function on a folder with 10,000+ files. Of course by then we will probably be storing data in microbes. 

Bob S







More information about the use-livecode mailing list