groups and background

UDI eudio at chabashira.co.jp
Fri Dec 20 02:40:01 EST 2002


Dar Scott wrote 02.12.19 01:41 PM:
>> Event on card:
>>
>> * bgA include bgB
>>
>>       card --> bgA --> stack
>>                bgB ( no message )
>>
>> * bg1 NOT include bg2
>>
>>       card --> bg2 --> bg1 --> stack
>>           ( by layer big to small )
>
>Would this be a good summary?
>
>    If the target is a control within a group
>    then the path includes the groups
>    it is within (inner to outer) followed by the card.
>
>    If the target is not within a group (including the card)
>    then the path includes the card followed by all background groups
>    that are immediately owned by the card from high layer to low.

Yes, I think so.

All bg is unrelated, and control on card:
   control --> card --> bg4 |
                        bg3 |
                        bg2 v
                        bg1 --> stack

All bg is unrelated, and control is included in bg3:
               bg4 ( no message )
   control --> bg3 --> stack
               bg2 ( no message )
               bg1 ( no message )
               card ( no message )

bg3 is included bg2, and control is included in bg3:
               bg1 ( no message )
   control --> bg3 --> bg2 --> stack
               bg4 ( no message )
               card ( no message )


You can test it with such handlers:

-- script for some target object ( contorol, group, card .. )
on mouseUp
  theEvent
end mouseUp

-- script for some receiver object ( group, card, stack .. )
on theEvent
  put ( the short name of me ) & return after field 1
  pass theEvent
end theEvent


UDI
eudio at chabashira.co.jp
http://member.nifty.ne.jp/UDI/



More information about the Use-livecode mailing list