Card navigation
David Squance
squance at elkvalley.net
Fri Nov 26 13:25:06 EST 2004
>--- David Squance <squance at elkvalley.net> wrote:
>> I have a script which is intended to speed up
>> locating a card on a
>> find command by using an index field. However, when
>> tested in the
>> msg box, it comes up as card not found. If I "put"
>> with the
>> variable, the correct id (or name when I tried that)
>> appears. If I
>> try
>> "go cd <id whatever>" it goes where it should. This
>> is the find button script:
>>
>> on mouseup
>> ask "Find what name:"
>> find it in fld "nameindex"
>> put "id"&&(item 2 of the value of the foundline)
>> into tcardno
>> go cd tcardno
>> end mouseup
>>
>> Any reason it shouldn't work?
>> cDave
>>
>
>Hi Dave,
>
>My guess is that the engine expects the variable
>'tcardno' to contain either the name or the number of
>a card ; and unless your card is named "id 12345" it
>is not going to find it.
>The easy solution :
>--
> put item 2 of the value of the foundLine into
>tCardID
> go card ID tCardID
>--
>or you could use the 'do' command, but that would be
>overkill.
>
>Jan Schenkel.
>
Thanks, Jan
That worked. I should have thought to put the ID after the "go card"
rather than where I had it.
Dave
More information about the use-livecode
mailing list