How to change the Userproperties

The engine.
Post Reply
musicpxg
Posts: 19
Joined: Sat Feb 16, 2013 6:24 am

How to change the Userproperties

Post by musicpxg »

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?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: How to change the Userproperties

Post by shooltz[BayesFusion] »

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).
Post Reply