[TIP] How to ensure plain pasted text

Hugh Senior h at FlexibleLearning.com
Mon Oct 27 08:27:29 CDT 2008


For those watching this thread, there is a verified bug when focusing out of
a field after doing a "put into
selection": the exitField message is sent instead of the closeField
(http://quality.runrev.com/qacenter/show_bug.cgi?id=7354).

As a workaround you will need to trap this...

local oldMe
on openField
  put the value of the target in oldMe
end closeField

on exitField
  if (the value of the target<>old) me then send "closeField" to the target
end exitField

on closeField
  [.../...]
end closeField

on commandKeyDown Vkey
   if Vkey = "v" and the selectedField is not empty then
     put the clipboardData["text"] into the selection
   else
     pass commandKeyDown
   end if
end commandKeyDown

/H




More information about the use-livecode mailing list