List Field and Ask Dialog

David Vaughan drvaughan55 at mac.com
Sat Apr 6 04:12:01 EST 2002


Magnus

Without giving you the text of the answer, your problem is that in your 
test case you have already selected a line in the field so the chunk 
("selectedText") is valid. After the ask dialog that field is no longer 
selected so any chunk address fails.

You need to note the line you selected before the ask dialog and then 
reselect it before doing the put statement.

regards
David

On Saturday, April 6, 2002, at 06:41 , Magnus von Brömsen wrote:

> Hello
>
> I have a List Field with some lines of text. When clicking a line I 
> want the Ask dialog shown, fill in a number and have that number put in 
> (with a tab) after the last word of the line.
>
> 1. This script in the Text Field works:
>
> on mouseUp
>   put tab & "1" after the last word of the selectedText -- the number 
> "1" is an test
> end mouseUp
>
>
> 2. But if I add the Ask-dialog:
>
> on mouseUp
>   ask "How many?"
>   put tab & it after the last word of the selectedText
> end mouseUp
>
> I have this error:
>
> Chunk: no target found
> --------------------
> put tab & it after the last word of the selectedText
> --------------------
> Value: mouseUp
>
> I have tried a lot of different ways (clickText, clickLine, 
> selectedLine...) but always the same error: "Chunk: no target found"
>
> Anyone having a solution? An idea? All help will be appreciated!
>
> Thanks.
> Magnus von Brömsen
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list