Trouble deleting a line of text

Bill Vlahos bvlahos at mac.com
Sun Aug 24 18:36:50 EDT 2008


I have a table field (but in testing any field behaves this way) that  
I want to delete a line of text when the user right clicks on it. The  
following script deletes the line of text as expected but then throws  
an error.

1. Create a field and type several lines of text in it.
2. Lock the text of the field (so it can respond to mouseUp)
3. Paste the following code into the field
4. Click on a line of text

on mouseUp
   select the clickLine
   answer "Really delete" & return & the clickLine && "?" with "No" or  
"Yes"
   if it is "Yes" then
     delete the clickLine
   end if
end mouseUp

What am I missing?

Bill Vlahos



More information about the use-livecode mailing list