Thanks Robert,Dick,Dar,Richard,, --empty item at end of list in case I forgot anyone ;-)

That is the answer I need.  In my button or field script I can just put:

on mouseUp --this was actually called by another button and not actually clicked on by me
  DoMyFieldScript --couldn't be simpler
end mouseUp

Then in the card I put:

on DoMyFieldScript
  put the long name of the target into myCompletePath
put (token 1 to 5 of the long name of the target&quote into myNameAndGroup
  put the id of the target into myID --many ways to use this reference
put (token 1 to 5 of the long name of fld id myID)&quote into myNameAndGroup
  put the short name of fld id myID into myName
  etc.,etc.,etc...
end DoMyFieldScript

This is such a basic concept for consolidating multiple object scripts that need to refer to the calling object --and it turns out to be simple. It seems like a whole scripting tutorial could be devoted to all the theme and variations on this target etc. concept. A simple example of each variation along with how and why it should be used would be a great reference. I am sure there are many more tricks like this than I am aware of yet.

Dennis


On Jun 8, 2005, at 7:13 PM, Robert Brenstein wrote:

On Jun 8, 2005, at 3:16 PM, Dick Kriesel wrote:


You can find the name of the group that contains the target in "the long
name of the target."



Hmm, I just created two groups named differently, each with a button of the same name. Each button called same a handler on the card with:

 get the short name of the owner of the target

This returned a different, and correct, group name depending which button I clicked.

Isn't this what the original poster wanted?

Similarly

  get the id of the target

returns the proper, and unique, id of the button clicked. So while the target itself returns incomplete description to uniquely identify an object, it can still be used to get unique identification as far as I can see.

Robert
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to