Choosing an Enum value does not update the editor

Hi,

since I migrated my languages to MPS v3.2 some strange problems arise. One of them is the following:

I have a concept A which has a property of type MyEnum. This type is defined in the same language as an Enum Data Type. Now when I create an instance of A and afterwards choose one of my values of MyEnum, internally this value is set but the editor does not visualize the change, i.e. it continues showing the red text indicating that the value has not been set, yet. But when I choose the value a second time it works.
I also tried to create a new MyEnum2 data type. Using this one it works as expected. But I already have many instances that use MyEnum and I don't want to migrate them. Is there any known issue with the migration of Enums?

Thank you very much in advance,
LaAck
1 comment
Comment actions Permalink
UPDATE: Ok, it seems that there is a problem with the "show if" cell property of the editor definition. There I check wich Enum value is set in order to modify the editor's appearance. Replacing these "show if" conditions by an Alternation cell model avoids this problem. But the cause should be analyzed, since an Alternation cell model can be an overkill in many situations.

UPDATE 2: Ok, maybe I found the reason. My condition for showing/not showing an editor cell is sometimes only:

myNode.myEnumValue.is< ParticularValue >
prettyPrint();

When I first tried it, I found out that checking whether the value is null was not necessary (I wondered why but somehow accepted it). It seems that this has changed with MPS 3.2. Adding the null check solves the error.
0

Please sign in to leave a comment.