Enable/disable Group enables/disables all children

Bob Sneidar bobsneidar at iotecdigital.com
Thu Apr 26 14:53:22 EDT 2018


I suppose a better example would be setting the backgroundColor of a group to blue. Should ALL the objects backgroundColor also be set to blue? If not, then why the disabled property? 

Bob S


> On Apr 26, 2018, at 11:50 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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





More information about the use-livecode mailing list