Folks,
 
I successfully compiled the example Java DynamicDimmerSwitch code on pp 92-93 of Jess In Action.
 
The next step (and the last item in the chapter) was to hook up Jess to the new switch  JavaBean (I previously successfully did so with the DimmerSwitch example)
 
Here is the outcome (yes the import is in the java code, yes I have the latest JDK etc.)
 
Jess> (defclass dimmer DimmerSwitchDynamic)
 
DimmerSwitchDynamic
Jess> (bind ?ds (new DimmerSwitchDynamic))
 
<External-Address:DimmerSwitchDynamic>
Jess> (definstance dimmer ?ds)
 
Jess reported an error in routine DefinstanceList.definstance
 while executing (definstance dimmer ?ds).
  Message: Obj doesn't accept PropertyChangeListeners.
  Program text: ( definstance dimmer ?ds )  at line 213.
Nested exception is:
DimmerSwitchDynamic.addPropertyChangeListener(java.beans.PropertyChangeListener)
java.lang.NoSuchMethodException: DimmerSwitchDynamic.addPropertyChangeListener(java.beans.PropertyChangeListener)
 at java.lang.Class.getMethod(Unknown Source)
 at jess.d7.a(Unknown Source)
 at jess.Rete.definstance(Unknown Source)
 at jess.a3.call(Unknown Source)
 at jess.ep.a(Unknown Source)
 at jess.Funcall.execute(Unknown Source)
 at jess.Jesp.a(Unknown Source)
 at jess.Jesp.for(Unknown Source)
 at jess.Jesp.parse(Unknown Source)
 at jess.Jesp.parse(Unknown Source)
 at jess.Main.execute(Unknown Source)
 at JessWin.jessExecute(JessWin.java:1115)
 at JessWin$63.run(JessWin.java:1062)
 at java.lang.Thread.run(Unknown Source)
Jess>
 
Thoughts?
 
(PS; for one person on this list with initials JM - no item in the rest of the book addresses THIS question)
 
Mke

Reply via email to