Kbase P61542: Backspace in decimal field not deleting characters properly
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/7/2004 |
|
Status: Unverified
SYMPTOM(s):
Backspace in decimal field not deleting characters properly
Negative sign is removed from number, making the number positive
The last digit changes to zero
No other digits can be deleted by continuing to press the backspace key
CAUSE:
bug# 20020624-036
CAUSE:
This is a known issue.
It occurs for any number format with trailing characters after the number, for example "-ZZ.99abc", "(ZZ,ZZZ.99)" or ">>.>99,99-".
It only occurs if the cursor is positioned after the decimals separator.
FIX:
Workaround:
Move to a different position in the field and continue to delete.
This can be done programmatically using a generic trigger, for example:
on 'backspace' anywhere do:
if self:data-type = "decimal" and self:format matches "*-" then do:
if self:cursor-offset = length(self:format) then do:
apply "0" to self.
apply 'cursor-left' to self.
apply 'cursor-left' to self.
return no-apply.
end.
end.
end.