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.

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.

Another oddity is that with card 1, if the field is empty when the button is clicked, then "me" is not "MessageX", but is instead empty when you try to answer using it as I am doing with the MessageY handler above.

So here is the script I have in both handlers:

answer "long id =" && the long id of me & return & "me="&me && "in MessageY"
 set the cp of the long id of me to me
put MessageY into me --note, I'm using the message itself not a string constant

Obviously, MessageY needs to be changed to MessageX in that handler..

Here's what I've found: when the button and the field are on the same card "me" inside the handler is empty (as evidenced by what will be in the cp of the field). However, if the message is sent to card 2 from card 1 then "me" will be "MessageY", and nothing will be put into the field (probably because "me" is not a reference to the field"). However, even though MessageX is empty in the handler of the field or card 1, "MessageX" still gets put into the field.

Surely this is weirder than anyone expected?


Bernard

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

Reply via email to