(declare (ordered TRUE)
(backchain-reactive TRUE)))
(backchain-reactive is not working)
import java.beans.*;
public class AutoBean implements Serializable
{
private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
private String name = "Bob";
public String getName()
{
return name;
}
public void setName(String name)
{
String oldValue = this.name;
this.name = name;
pcs.firePropertyChange("name", oldValue,
this.name);
}
public void addPropertyChangeListener(PropertyChangeListener pcl)
{
pcs.addPropertyChangeListener(pcl);
}
public void removePropertyChangeListener(PropertyChangeListener pcl)
{
pcs.removePropertyChangeListener(pcl);
}
}
(clear)
(defclass bean AutoBean)
(bind ?bean (new AutoBean))
(definstance bean ?bean dynamic)
f-0 (MAIN::bean (class <Java-Object:java.lang.Class>) (name "Bob") (OBJECT <Java-Object:AutoBean>))
However, during my second test (only tested under 70b6)
I did not (exit) jess. I just changed property name from "name" to "names" and recompile the AutoBean.class and then enter
(clear)
(defclass bean AutoBean)
(bind ?bean (new AutoBean))
(definstance bean ?bean dynamic)
(facts *)
f-0 (MAIN::bean (class <Java-Object:java.lang.Class>) (name "Bob") (OBJECT <Java-Object:AutoBean>))
Jess is not awaring of this change. I have to exit jess and re-enter jess to make it work.
=>
(if (=1 0) then then else (printout t "comment test passed" crlf))
)
comment test passed
1
I realize that jess engine just echoes the second then so no exception is thrown. but still seems strange to me.
