empty ask result + ok = result:cancel

MisterX b.xavier at internet.lu
Sun Jul 24 14:04:06 EDT 2005


im implementing a nice search and replace function and well, check it out...
 
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

Now, if i want to replace x with nothing, i leave the second ask
empty but the result, despite clicking OK, is "Cancel"... grrr

Can any of you replicate this?
bugzilla or is it me?

TIA
cheers
Xavier




More information about the use-livecode mailing list