Creando un nuevo comportamiento: campo de texto y caracteres acentuados

Modificant el proces de entr de datos per teclat de MetaCard, ...

Figura 6-5. Modificando el objeto campo de texto para que permita introducir caracteres acentuados.

Aviso

Explicar: situar y comentar el cdic.

local codicsTecles = "=&`=&="
local codicAnterior codicActual

on keyDown quinCaracter
  split codicsTecles by "&" and "="
  
  set the caseSensitive to true   # Per despues les majuscules i minuscules
  if quinCaracter is among the words of " ` " --"65105 65104 65111"
  then
    put quinCaracter into codicAnterior
    #    put "guardat" && codicAnterior
  else
    if (codicAnterior is not empty) and\
       (quinCaracter is among the words of "a e i o u A E I O U")
    then -- Convertir a la vocal en funcio del simbol anterior
      #  Gracies a la inestimable ajuda del codic de MetaCard, he descobert la 
      # funcio select i les de la familia i ...
      put  char (offset(quinCaracter, "aeiouAEIOU")) of codicsTecles[ codicAnterior ] \
          before char (word 2 of the selectedChunk) of me
    else
      pass keyDown
      --      put  quinCaracter  before char (word 2 of the selectedChunk) of me
    end if
    put empty into codicAnterior
  end if
end keyDown