On Mon, Aug 25, 2008 at 8:36 AM, Bill Vlahos <[EMAIL PROTECTED]> wrote:
> 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
>
The problem is that "the clickLine" is not preserved and becomes empty
while the answer dialog is open (or when it closes).
Try this instead. It stores "the clickLine" first, then uses the
stored value instead of expecting "the clickLine" to remain the same:
on mouseUp
put the clickline into tClick
select tClick
answer "Really delete" & return & tClick && "?" with "No" or "Yes"
if it is "Yes" then
delete tClick
end if
end mouseUp
Cheers,
Sarah
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution