>>>>Hello all,
>>>>I have notice the nodefault option in define class command,
>>>>what the 'nodefault' affect? I don't understand what the MSDN library say.
>>>
>>>In plain English it says 'do not do default action'. Suppose you have this code in keypress :
>>>
>>>
if nKeyCode = asc('Z')
>>> nodefault
>>>endif
Absorbs all Z input. Or as another example, say you want to check something in lostfocus and do not leave the control if it fails (like valid) :
>>>
>>>
if llNotSatisfied
>>> nodefault
>>> this.Setfocus()
>>>else
>>>endif
Try this with nodefault. Only built-in methods/events are effected by it AFAIK.
>>>Cetin
>>
>>Cetin,
>>
>>Exactly that I did in LostFocus yesterday. But I don't need the third line :) Or I was just lucky? :)
>
>Sometimes you do :) Try with SelectOnEntry.
>Cetin
Thanks, I'll try :) BTW, it's for EditBox - remember your suggestion of normalize()? This function trows an error on empty string. Therefore I check in LostFocus of IndexExpr if it's empty, and in this case display a message and nodefault. For FilterExpr I check, if it's not empty, before using normalize().
Great tip, thanks again.
If it's not broken, fix it until it is.
My Blog