Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible bug in keypress
Message
From
04/08/2007 14:43:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
03/08/2007 04:02:06
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01245609
Message ID:
01245971
Views:
41
>>>
>>>No, the"bug" is here only if you didn't pass second parameter:
>>>
>>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>>if between(nKeyCode, 32, 255) and isalpha(chr(nKeyCode))
>>>   NODEFAULT
>>>   DODEFAULT(Asc(Upper(Chr(nKeyCode))))
>>>ENDIF
>>
>>I see. Yes, with it D, E, W it doesn't work.
>>
>>Well, if we introduce bugs ourselves why should we complain? :)
>
>In fact this IS a bug, and nothing I introduced. Check my old version of the same function, which contains only "legal" code, and you will see the same anomaly.
>
>This code "eats" some character, as I mentioned
>If nKeyCOde>0 and ISALPHA(CHR(nKeyCode))
>  NODEFAULT
>  nKeyCode=ASC(UPPER(CHR(nKeyCode)))
>  DODEFAULT()
>EndIf
>This code, where I have separated the two condiotions, works....!
>If nKeyCode>0
>  If IsAlpha(Chr(nKeyCode))
>    NoDefault
>    nKeyCode=Asc(Upper(Chr(nKeyCode)))
>    DoDefault()
>  EndIf
>EndIf
Now you're gone from just one parameter in dodefault() to zero. So, dodefault with what exactly?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform