Kbase P19536: Using the ADD-FIRST or ADD-LAST method for a COMBO-BOX defined as character or decimal results in tw
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/24/2011 |
|
Status: Verified
SYMPTOM(s):
Using the ADD-FIRST or ADD-LAST method for a COMBO-BOX defined as decimal results in two values being added.
Using the ADD-FIRST or ADD-LAST method for a COMBO-BOX defined as character results in two or more values being added.
COMBO-BOX defined as decimal value and using comma as decimal separator.
Character value passed contains commas.
Not specifying delimiter on the COMBO-BOX widget.
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
Progress 9.x
CAUSE:
Since the default delimiter for a Combo-box's list-items is a comma, ADD-LAST method treats the passed string as a delimiter-separated list, and adds multiple items.
Decimals are affected as well: To be able to pass a decimal value to the ADD-FIRST/ADD-LAST methods, it must be converted to a string first. If a comma is used as decimal separator, the converted string will also contain a comma.
FIX:
Set a delimiter other than a comma (",") for the Combo-box when it's created or initialized with ASSIGN <combo>:DELIMITER = <value>, before populating the list-items.
If for some reason you need to modify the list-items directly instead of using the ADD-FIRST/ADD-LAST methods, remember to use the correct delimiter by referencing the <combo>:DELIMITER attribute.