Bug???? Discuss please!
Dave
dave at looktowindward.com
Wed Nov 15 16:11:56 EST 2006
On 15 Nov 2006, at 20:42, Bernard Devlin wrote:
> Mark said:
> >>
> I would say this is a bug indeed. The message is sent, the handler
> MessageY runs, both paths are followed as expected, but "the target"
> and "me" are empty, while "the long id of me" is not empty.
> <<
>
> When I run this on 2.7.4 on OS X, me is not empty on entry into the
> message handler on the closed card. Try putting
>
> answer "me=" & me && "in MessageY"
>
> in the handler for the field on card 2. I find that "me" is
> evaluating to "MessageY" inside that handler - and nothing to do
> with the long id of the field. But getting hold of the field via
> "the long id of me" does work. So it is almost as though "me" is
> the actual message received by the handler, whilst "the long id of
> me" is a pointer to the field in which the handler lives.
I would imagine that the "long id of me" form causes a re-evaluation
of the address of the field, whereas "me" refers to an address that
has already (incorrectly in this case) been evaluated and stored. The
"long id of me" form takes longer and so tends to bear this
assumption out.
The sharedText property adds to the confusion.
In short, the only people that can really say what should be fixed
are the people with the source code. Just knowing what is "supposed"
to happen in this case would help.
>
> Just to show that this is what seems to be happening, you can also
> put "me" into a custom property - in that same handler, add this line
>
> set the cp of the long id of me to me
>
> And it is clear that "me" and "the long id of me" are very different.
"me" (usually) refers to either the contents of a field or a
reference to an object (field in this case), in the case of:
put "xxx" into me it refers to the contents
in the case of
the long id of me it refers to the address/reference of "me" which
will return a string of the form:
field id 1026 of group id 1036 of card id 1002 of stack "/Folders.../
StackMain.rev"
All the Best
Dave
More information about the use-livecode
mailing list