empty ask result + ok = result:cancel

Dennis Brown see3d at writeme.com
Sun Jul 24 15:28:09 EDT 2005


x,

This script works fine on my OS X machine with 2.6 (108)
That is once I take out that extra end if

The empty and cancel are returned as expected.

Dennis

On Jul 24, 2005, at 2:04 PM, MisterX wrote:

> local lselection
>
> on mouseenter
>   put "viewbar" into f
>   get the selectedtext of fld f
>  put it into lselection
>   end if
> end mouseenter
>
> on mouseUp
>   local f,x,y,txt
>
>   put "viewbar" into f
>   put fld f into txt
>
>   ask "Replace what:" with lselection
>   put it into x
>   get the result
>   if it is "cancel" then exit mouseup
>   ask "Replace with:" with it
>   put it into y
>   get the result
>   if it is "cancel" then exit mouseup
>
>   replace x with y in fld f
> end mouseup
>




More information about the use-livecode mailing list