On Jul 24, 2012, at 12:22 PM, Ben Rubinstein wrote:

> On 24.07.2012, at 17:33, Dr. Hawkins wrote:
> > I have a handler that needs to handle an event differently depending
> > upon which substack the button calling it is on.
> 
> You could use "the owner" to walk up the heirarchy from the target - eg 
> create a function "owningStack" which successively gets the owner of its 
> parameter (originally the target) until it gets a stack?

Here's a ndler I use to get the highest background of a control:

function masterBG theObject
   put the long id of the owner of theObject into onr
   if word 1 of onr = "card" then
      return theObject
   else
      return masterBG(onr)
   end if
end masterBG

You could modify this…

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig



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

Reply via email to