The Sender

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ChristopherBodell
Posts: 52
Joined: Sun Jan 20, 2008 7:06 am

The Sender

Post by ChristopherBodell » Thu Jan 01, 2009 6:57 am

How would i obtain the owner of a message sent through the message que or path.

Or in other words, if im wording that wrong, how would i get the name of the object who's script has been called or is being called. I want to obtain the name within the objects script itself, unless i have to get it externally which would still be fine.

Many Thanks,
Christopher

ChristopherBodell
Posts: 52
Joined: Sun Jan 20, 2008 7:06 am

Owner?

Post by ChristopherBodell » Thu Jan 01, 2009 7:01 am

I think i just use the "owner" property or obtain the controls name through its id from the mouseControl. This is what im looking for....

Many Thanks,
Christopher

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Thu Jan 01, 2009 11:33 am

Hi Christopher,

there are two things you might want to look at.

First is "the target"

The target will contain a reference to the object that originally received the message. However, that would not necessariely be "the sender" as I would define it. If you want to find out who originally send the message, you might need to look at the (undocumented and thus unsupported) exectutioncontexts.

This will hold a lot of information on who send and who received the message.

Hope that helps,

Malte

Post Reply