Previous Thread

8/18/2006 4:36:02 AM    Changing referenced enum values breaks value recognization
Hi all, 
 
I've got an enum say MyEnum containing 3 elements 
 
0 - none 
 
1 - first 
 
2 - second 
 
If I use the enum value in code such as  if(tbl.checkValue == 
 
MyEnum::second){... 
 
and after using the enum I'll change the enum value to 
 
MyEnum 
 
.... 
 
99 - second 
 
After the change the enum won't recognize the change ie. MyEnum::second 
 
still points to value 2 and not to 99! 
 
I'll have to check each piece of code where I've used the enum and delete 
 
the '::second' portion and type the enum name again so that Axapta keeps up 
 
with the value change. 
 
Any ideas how to update the enum references without going through all of the 
 
code lines where a particular enum name has been used? 
 
Regards, 
 
Tomi



8/18/2006 4:12:20 PM    Re: Changing referenced enum values breaks value recognization
Tomi, 
 
You certainly don't have to re-type your code. That would defeat the point 
 
of having enum's. Have tried to flush the object cache or have you tried to 
 
re-compile the touched elements? What you are experiencing shouldn't be a 
 
problem, I haven't experienced this before. 
 
Regards, 
 
Anton 
 
"Tomi" <Tomi@discussions.microsoft.com> wrote in message 
 
news:8894745F-09EE-4C4C-986C-0451A24DE9B9@microsoft.com...