Hi! Two questions. For nested Java attributes where data elements are inside other data elements inside other data elements, it seems that JESS requires a Java program to "add" the items to be placed in "definstance" one at a time if pattern matching is to occur. Is there a better (i.e., fewer lines of code or adding whole-objects-at-a-time) method to construct objects in Java for JESS that are to be pattern-matched?

Second, there seems to be a trivial error in the following due to something I seem to be misunderstanding. I create a "Person" object as a dynamic definstance successfully, but get a "Property not found: tn" (from DefinstanceList.createFact) message when I call "settn" with one String parameter. What am I missing?

Thanks!

David

import java.lang.reflect.Array;
import java.beans.*;

public class Person extends Object implements java.io.Serializable {
private String tn;
private String test[];

public Person (String telephone, String parm[]) {
super();
int l = parm.length;
test = new String[l];
int i;

for (i=0; i<l; i++)
test [i] = parm[i];
tn = telephone;
}

private PropertyChangeSupport pcs = new PropertyChangeSupport(this);

public void addPropertyChangeListener(PropertyChangeListener pcl)
{
pcs.addPropertyChangeListener(pcl);
}
public void removePropertyChangeListener(PropertyChangeListener pcl)
{
pcs.removePropertyChangeListener(pcl);
}

public void settn (String value) {
String temp = tn;
tn = value;
pcs.firePropertyChange ("tn", temp, tn);
}
}


_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to