Recent

Author Topic: IDE: Property editor does not show all possible values of a property  (Read 416 times)

CM630

  • Hero Member
  • *****
  • Posts: 1679
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
In a TComponent there is:

Code: Pascal  [Select][+][-]
  1. TFlowControl=(fcNone=0,
  2. fcXonXoff=1, fcXonXoff_and_DTR=1,
  3. fcRTS_CTS=2, fcHardware = 2,
  4. fcXonXoff_no_DTR=3,
  5. fcXonXoff_and_RTS_CTS=4,
  6. fcDTR_DSR=5,
  7. fcXonXoff_and_DTR_DSR=6,
  8. fcDTR=7);
  9. ...
  10. published:
  11. ...
  12.     property FlowControl: TFlowControl read FFlowControl write SetFlowControl;
  13. ...
  14.  

When I build the IDE the last two values (fcXonXoff_and_DTR_DSR and fcDTR) are not shown in the property editor.
Is this fixable?


In case in matters, the control is TLazSerial. I am trying to update the FlowControl property by adding more values and renaming the non-standard fcHardware to fcRTS_CTS. In the same time I want to keep the compatibility from the previous versions.

Edit: I tried to change:
Code: Pascal  [Select][+][-]
  1. TFlowControl=(fcNone=0, fcXonXoff_and_DTR=1, fcRTS_CTS=2, fcXonXoff_no_DTR=3,fcXonXoff_and_RTS_CTS=4, fcDTR_DSR=5, fcXonXoff_and_DTR_DSR=6, fcDTR=7,
  2.                  fcXonXoff=1, fcHardware = 2);
When I opened the project fcHardware was automatically converted to ... fcDTR. Maybe because it is the first in alphabetic order.
« Last Edit: April 16, 2026, 03:39:02 pm by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

dsiders

  • Hero Member
  • *****
  • Posts: 1607
Re: IDE: Property editor does not show all possible values of a property
« Reply #1 on: April 16, 2026, 07:04:22 pm »
In a TComponent there is:

Code: Pascal  [Select][+][-]
  1. TFlowControl=(fcNone=0,
  2. fcXonXoff=1, fcXonXoff_and_DTR=1,
  3. fcRTS_CTS=2, fcHardware = 2,
  4. fcXonXoff_no_DTR=3,
  5. fcXonXoff_and_RTS_CTS=4,
  6. fcDTR_DSR=5,
  7. fcXonXoff_and_DTR_DSR=6,
  8. fcDTR=7);
  9. ...
  10. published:
  11. ...
  12.     property FlowControl: TFlowControl read FFlowControl write SetFlowControl;
  13. ...
  14.  

When I build the IDE the last two values (fcXonXoff_and_DTR_DSR and fcDTR) are not shown in the property editor.
Is this fixable?


In case in matters, the control is TLazSerial. I am trying to update the FlowControl property by adding more values and renaming the non-standard fcHardware to fcRTS_CTS. In the same time I want to keep the compatibility from the previous versions.

Edit: I tried to change:
Code: Pascal  [Select][+][-]
  1. TFlowControl=(fcNone=0, fcXonXoff_and_DTR=1, fcRTS_CTS=2, fcXonXoff_no_DTR=3,fcXonXoff_and_RTS_CTS=4, fcDTR_DSR=5, fcXonXoff_and_DTR_DSR=6, fcDTR=7,
  2.                  fcXonXoff=1, fcHardware = 2);
When I opened the project fcHardware was automatically converted to ... fcDTR. Maybe because it is the first in alphabetic order.

You can't have duplicate ordinal values in the enumeration. The alphabetic order is probably a property editor artifact.

 

TinyPortal © 2005-2018