Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible bug in keypress
Message
De
04/08/2007 14:43:48
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
03/08/2007 04:02:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01245609
Message ID:
01245971
Vues:
42
>>>
>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform