SCRIPTS IN GROUPS

Klaus Major klaus at major-k.de
Sat Aug 6 08:37:44 EDT 2005


Hi Bill,

> How come if you have a script in a group, and that group is the  
> same size as
> a button, the "mouse-up" handler in the group responds when you click
> anywhere in the card and not just directly over the group?

if the "backgroundbehavior" of that group = true, then this is the  
correct behavior!

That script is put into the message path AFTER the card:

object -> (group with NO bg behav.) -> card -> BG (= group WITH bg  
behav.) -> stack...

I alsways check "the owner of the target" in these cases in the bg  
script.

on mouseup
     if the owner of the target = me then
      ## an object INSIDE that group was clicked
     end if
end mouseup

Hope that helps.



Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list