On Tuesday 26 June 2001 20:19, friedman_hill ernest j wrote:
> Hi,
>
> Your code is fine, and would definstance each object in the vector
> separately, as you intend. You unfortunately just say that createFact()
> throws an exception, without telling us what the message says, so I
> have to guess at what's going wrong. The most likely scenario is that
> the class jesstests.EmailInfo doesn't support PropertyChangeListeners
> (i.e., it doesn't have an addPropertyChangeListener method.) You can
> either a) add PropertyChangeListener support to this class, which
> would allow Jess to be updated when a Bean property changed, or b) add
> the atom "static" to the end of the definstance call; see the
> documentation for definstance in chapter 8 of the manual.
>


Thanks for your quick reply. My class jesstests.EmailInfo does have an
addPropertyChangeListener() method... in fact, once again I copied it 
from the pumps example, and here's the code:

  private PropertyChangeSupport pcs = new PropertyChangeSupport(this);

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

I forgot to include the exception I got, so here it is:

Jess reported an error in routine Definstance.createFact while executing 
(definstance emailInfo <External-Address:jesstests.EmailInfo>).
  Message: Called method threw an exception.
        at jess.Definstance.createFact(ReflectFunctions.java:1002)
        at jess.Definstance.call(ReflectFunctions.java:911)
        at jess.FunctionHolder.call(FunctionHolder.java:37)
        at jess.Funcall.execute(Funcall.java:228)
        at jesstests.JessTest.checkVector(JessTest.java:89)
        at jesstests.JessTest.<init>(JessTest.java:31)
        at jesstests.JessTest.main(JessTest.java:36)

I couldn't make much of this error, hope you can :)
I also forgot to say I'm using Jess 5.2 (since it's the latest stable 
version).


--
        Cheers,

-- Ricardo Manuel Oliveira
-- Computer Science Student
-- FCT - University of Coimbra

---------------------------------------------------------------------
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