Getting the name of objects

Steve Messimer steve at messimercomputing.com
Fri Nov 22 09:14:01 EST 2002


Hi,

I need some help with this. I am creating groups in one stack and pasting
them in another.  The group contains a field and a lock button that when
clicked will toggle the lockText property of the field. The problem is that
in the process of pasting the grp it is renamed so the lock btn has to be
able to determine the name of the grp in order to work. ( have tried the
script w/o the grp reference and it doesn't work. here are a few of the
scripts I have tried without success.

on mouseUp
  if the icon of me is 954 then
    set the icon of me to 953
    set the lockText of fld "fldGrp" of the owner of me to false
  else
    set the icon of me to 954
    set the lockText of fld "fldGrp" of the owner of me to true
  end if
end mouseUp

on mouseUp
  put the short name of the owner of me into myOwner
  if the icon of me is 954 then
    set the icon of me to 953
    set the lockText of fld "fldGrp" of grp myOwner to false
  else
    set the icon of me to 954
    set the lockText of fld "fldGrp" of grp myOwner to true
  end if
end mouseUp

on mouseUp
put quote & the short name of the owner of me & quote into myOwner
  if the icon of me is 954 then
    set the icon of me to 953
    set the lockText of fld "fldGrp" of grp myOwner to false
  else
    set the icon of me to 954
    set the lockText of fld "fldGrp" of grp myOwner to true
  end if
end mouseUp

Thanks for your help.

Steve

Stephen R. Messimer
Messimer Computing, Inc
208 1st Ave South
Escanaba, MI 49829
www.messimercomputing.com





More information about the use-livecode mailing list