Hi, I am using the Jsmile. I want to change the value of a node user property, using the following codes. It doesn't work.
smile.UserProperty[] nodeproperty = net.getNodeUserProperties(handleID);
for (int i1 = 0; i1 < nodeproperty.length; i1++)
{
if (nodeproperty[i1].name.equals("Get_evidence_function") )
{
//nodeproperty[i1].value = "the new value";
}
It said "NameError: name 'the new value' is not defined"
I do not know how to do. Can anybody help me?
How to change the Userproperties
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: How to change the Userproperties
You need to call Network.setNodeUserProperties when you're done with modifying the UserProperty objects. The array returned by getNodeUserProperties contains copies of C++ SMILE strings (which can't be modified directly from Java).