on 09-07-2007 5:15 PM
I've created a Simple Type Enumeration (in the Local Dictionary) with these values :
RED
BLUE
GREEN
How do we verifiy if a string exist in this enumeration?
By example :
- check for the string "RED" --> true
- check for the string "YELLOW" --> false
Thanks!
Message was edited by:
Emanuel Champagne
Hi,
Here is the code:
IWDAttributeInfo attribInf = wdContext.getNodeInfo().getAttribute("Color");
ISimpleType simpleType = attribInf.getSimpleType();
Set set = simpleType.getEnumeration();
String color = "RED";
if(set != null)
{
if(set.contains(color))
{
wdComponentAPI.getMessageManager().reportSuccess("Color "+color+" is true");
}
}
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.