Le 30 sept. 04, à 00:23, [EMAIL PROTECTED] a écrit :
Hello,
I want the user type in upper case. I've made a script with the keyup handler to convert lower letter in upper letter, but the conversion is visible.
How make the conversion in the keydown handler ?
Bonjour Ludovic,
It's a pity but toUpper rev function is unaware of the existence of latin vowels :-)
You are french. So you need to uppercase them:
on keyDown pKey if the selectedChunk = empty then pass keyDown put InternationalToUpper(pKey) into the selectedChunk -- ∆ end keyDown -------------------------- function InternationalToUpper pKey local tASCIIVal ----- put charToNum(pKey) into tASCIIVal if tASCIIVal >= 97 and tASCIIVal <= 122 then return numToChar(tASCIIVal - 32) else return RightASCIIValue(tASCIIVal) -- ∆ end if end InternationalToUpper -------------------------- function RightASCIIValue pASCIIVal -- trap latin accented vowels put item itemOffset(pASCIIVal,"141,142,143,136,137,144,207") \ of "130,131,233,203,229,230,206" into tNewValue if tNewValue = empty then return numToChar(pASCIIVal) return numToChar(tNewValue) end RightASCIIValue
Note that Klaus Major formulation works fine unless a selection was done in the field.
Hope this helps. Contact me off list if needed.
Amicalement,
Éric Chatonet 24, Boulevard de Port-Royal 75005 Paris
Fixe : 33 1 43 31 77 62 Mobile : 33 6 20 74 50 89 _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution