Send and the context
Mike Bonner
bonnmike at gmail.com
Fri Feb 7 12:02:29 EST 2014
Ah k. I understand what you're saying now.
The OP points out that "put the short name of this card" is returning the
current card (as per the dictionary, and the behavior in the OP matches
this.)
If things remain the same and the message is "sent" to the card itself
(like it was in the OP) then the handler in the card can "put the short
name of me" and it will work because the handler is executing in the card,
but if the message is sent to an object on a card "the short name of me"
will return the object name not the card name. So one would have to do
something else to get the card name. (get the long name and parse, or go up
the "owner" tree till you get there if there are groups involved) So I
guess the OP example is a bit silly since if you're sending to the card
specifically you already know what it is and if you must, can pass it as a
parameter as part of the send.
Curious now though, is there an easy way to get the owning card name of an
object that is sent to without parsing or tree crawling?
On Fri, Feb 7, 2014 at 9:07 AM, Mark Wieder <mwieder at ahsoftware.net> wrote:
> Mike-
>
> Friday, February 7, 2014, 7:08:29 AM, you wrote:
>
> > Its also probable I should have typed it clearer.. use "of me" instead.
> > "This" refers to the current card of the default stack.
>
> I'm not concerned about your use of "this" or "current". But "me" is
> the object that generated the send or dispatch message. If you want
> the message to end up going to the card, direct it to the card, not to
> me.
>
> If me sends or dispatches a message to me, me will get the message.
>
> --
> -Mark Wieder
> ahsoftware at gmail.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list