Enable/disable Group enables/disables all children

Bob Sneidar bobsneidar at iotecdigital.com
Thu Apr 26 14:50:42 EDT 2018


You may be correct. This might be the expected behavior. But I am not convinced by the logic. It would be like saying that by dying my hair orange, I obviously wanted all the hair on my body to also be orange, or that I obviously wanted all my children's hair to be orange. Or that by locking me up in a jail cell you wanted all my children to go to jail, or vis versa. 

Disabling a group would be a great way to globally disable a set of controls, without going through the trouble of disabling each control, or else what other purpose does disabling a group have? The group will not respond to mouse actions. This must mean then, that if for example you set any property of a group, that all the contained objects would inherit that property. This could have some serious consequences, especially if it pertained to custom properties as well. Thankfully it does not! 

Bob S


> On Apr 26, 2018, at 11:04 , dunbarx via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> i would say this is expected behavior.
> 
> If you disable a control in a group, and then enable the group, LC assumes
> you want to, er, enable the group, and that means all members of that group.
> 
> So as you mentioned, make a gadget that stores the states of all the
> members, and resets when the group is enabled.
> 
> Craig Newman





More information about the use-livecode mailing list