How do I eliminate the spaceKey in a field?

William de Smet wdesmet at wanadoo.nl
Wed Nov 16 17:18:49 EST 2005


Hi Eric,

It worked! Thanks a lot!
I call it a day for now and will start working on it tomorrow.

Greetings from a rainy en stormy Holland!

William de Smet



Op 16-nov-2005, om 23:08 heeft Eric Chatonet het volgende geschreven:

> Hi William,
>
> Something as the following should do the trick:
>
> on keyDown pKey
>   if charToNum(pKey) <> 32 then pass keydown
> end keyDown
>
> Have a look at charToNum and NumtoChar very useful functions in the  
> docs.
> Hope this helps.
>
> Best Regards from Paris,
>
> Eric Chatonet.
>
> Le 16 nov. 05 à 23:04, William de Smet a écrit :
>
>
>> 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
>>
>
> ----------------------------------------------------------------
> So Smart Software
>
> For institutions, companies and associations
> Built-to-order applications: management, multimedia, internet, etc.
> Windows, Mac OS and Linux... With the French touch
>
> Free plugins and tutorials on my website
> ----------------------------------------------------------------
> Web site        http://www.sosmartsoftware.com/
> Email        eric.chatonet at sosmartsoftware.com/
> Phone        33 (0)1 43 31 77 62
> Mobile        33 (0)6 20 74 50 86
> ----------------------------------------------------------------
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>




More information about the use-livecode mailing list