List Field and Ask Dialog

Magnus von Brömsen webmaster at studioalice.se
Sat Apr 6 05:42:00 EST 2002


On lördag, april 6, 2002, at 11:10 , David Vaughan wrote:
> You need to note the line you selected before the ask dialog and then 
> reselect it before doing the put statement.

David,
I rewrite the script:

on mouseUp
   put the selectedText into vLine -- saving the text
   ask "How many?" with "1"
   put it into vNumber
   select vLine -- select  the text in the Text Field again. Don't seems 
to work
   put tab & vNumber after the last word of the selectedText
end mouseUp

This time (at least) there is another error:

Chunk: error in object expression
--------------------
select vLine
--------------------



Jeanne,
I get the old error (Chunk: no target found) when trying this:

on mouseUp
     ask "How many?"
     if it is not empty then put tab & it after the selectedLine
   end mouseUp


Thanks
>
>
>
> 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
>>
>
> _______________________________________________
> 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