The Owner of a background group

dunbarx at aol.com dunbarx at aol.com
Wed Aug 22 09:31:25 EDT 2012


Jacque.


Whew. Exhaustive presentation. Thanks.



I will keep this in my scrapbook. But my veiled point is that groups, for all their power and advantages, are just slightly a kluge, and have to manage odd and disparate issues due to the simple fact that they are an object that contains lower level objects.



So be it. I am not complaining, just nostalgic. I am still embellishing old HC stacks.




Regards,


Craig




-----Original Message-----
From: J. Landman Gay <jacque at hyperactivesw.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Aug 22, 2012 12:24 am
Subject: Re: The Owner of a background group


On 8/21/12 10:23 PM, dunbarx at aol.com wrote:

> And so a group, being an object that contains other objects, has no
> unequivocal place in the hierarchy.

There's an order. It's changed a couple of times, but as I understand 
it, the system is:

1. Card groups
   BackgroundBehavior: false
   Shared: no, only appears on one card
   Messages:
     control -> group -> card -> background(s) -> stack
   Event messages: no


2. Shared card groups
   BackgroundBehavior: false
   Shared: yes, if placed on multiple cards
   Messages:
     control -> group -> card -> background(s) -> stack
   Event messages: no


3. Background groups
   BackgroundBehavior: true
   Shared: yes
   Messages:
     Unplaced groups (not on any card): receive no messages
     Placed groups, when a grouped control is clicked:
        control -> group -> card -> other background(s) -> stack
     Placed groups, when clicked outside any control:
        card -> group -> other background(s) -> stack
   Event messages: yes


Unplaced groups can serve as resource storage for images, icons, 
behavior buttons, etc. and can be referenced by anything in the stack. 
They are not in the message hierarchy.

Numbers 1 and 2 are very similar and could probably be consolidated into 
simply "card groups". Shared card groups were removed from a recent 
version, and any group that was placed on multiple cards was 
automatically set to have its backgroundBehavior = true. But people had 
been sharing non-background groups and the change broke their stacks, so 
they were put back in again.

When not dealing with mouse messages, background groups always receive 
event messages after the card, and handler calls will travel through 
them on their way to the stack script. Card groups, both shared and 
unshared, do not receive event messages because they are "on top" of the 
card, and engine messages are always sent to the card. Handler calls 
from the card will not reach card groups either unless specifically 
"sent" there.

That's my current understanding but if any of it's wrong, someone please 
correct me.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the Use-livecode mailing list