when sent a message, the target can't find itself!

Mike Bonner bonnmike at gmail.com
Sat Aug 4 18:29:27 EDT 2012


if I have a command "putit" in the field script and
send "putit" to field "myfield"

and the command putit has the line "put 85 into the target" it works fine
for me.

As was pointed out, you have to watch your references

 put 45 into fld (the long name of the target)

actually says

put 45 into *fld (field* "Field" of card id 1002 of stack "Untitled 1")



On Sat, Aug 4, 2012 at 3:58 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> On 8/4/12 4:53 PM, Dr. Hawkins wrote:
>
>> On Sat, Aug 4, 2012 at 2:31 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>>
>>>
>>> Change it to
>>>
>>> put exists(the long name of the target)
>>>
>>> and it should behave as expected.
>>>
>>
>> Thanks.
>>
>> That got the exists() working.
>>
>> Maybe I'm dense, but I cant get access to the field to work the same way.
>>
>>    put the text of (the long name of the target)
>>         yields empty, which I believe is correct, but
>>    put 45 into fld (the long name of the target)
>>
>>
>> (after all, putting something into it is the whole point.)
>>
>> And while I'm at it, when the script is executing, shouldn't "put 7
>> into the target" work--the script is executing from a message sent to
>> the target, after all.
>>
>>
>>
> If you substitute "field x of card y" for every instance of "the long name
> of the target" in your script, you'll probably see the problem right away.
> As Alex mentioned, the "put" line evaluates to:
>
>   put 45 into fld (field x of card y)
>
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list