How do I eliminate the spaceKey in a field?

William de Smet wdesmet at wanadoo.nl
Wed Nov 16 17:04:30 EST 2005


Hi there,

I am trying to limit the input into a field.
Therefore I already used the returninField code but now I want to  
block out the spacebarKey/spaceKey (don't know the English word)  
because I don't want
the user to put a space after a word.

I've already looked at the RawKeyDown-  and KeysDown  function  but I  
can't figure it out.
Is it possible wat I want?

So far I use the following code in the field:
on returnInField
    put line 1 of me into me
    answer "Er mag maar één woord in dit veld!" with "OK"
end returnInField

on closeField
    if return is in me then
      returnInField
    end if
    pass closefield
end closefield


Thanks!
William de Smet




More information about the use-livecode mailing list