Hi there,
I have an enum called Position containing the following values:
i) First
ii) Second
iii) Third
I have a combobox which is based on this enum. However, in the enter event of the combobox, I deleted the first entry using this code:
public void enter()
{
super();
this.delete(enum2str(Position::First));
}
Now, I am using this code to get the selected enum value from the combobox:
Position position;
;
position = Combobox.selection();
The problem is that, when I select Second as the value in the combobox, the value assigned to the position variable is First. I think that this is due to the fact that the deletion of the first enum value in the Combobox resulted in label Second having a value 0 and label Third having a value 1. However, when assigned to the variable position, the label Second with value 0 is translated to First.
How can I solve this please?