The code of my Item class goes like this....
****************************************************************************
****
public class Item implements Serializable {
private String itemName;
private int itemCost;
public Item () {
itemName = new String ();
itemCost = 0;
}
public Item (String itemName, int itemCost, Rete rete) {
this.itemName = new String (itemName);
this.itemCost = itemCost;
this.rete = rete;
}
public String getItemName () {
return itemName;
}
public void setItemName (String itemName) {
this.itemName = itemName;
}
public int getItemCost () {
return itemCost;
}
public void setItemCost (int itemCost) {
this.itemCost = itemCost;
}
private PropertyChangeSupport pcs = new PropertyChangeSupport(this);
public void addPropertyChangeListener(PropertyChangeListener pcl)
{
pcs.addPropertyChangeListener(pcl);
}
public void removePropertyChangeListener(PropertyChangeListener pcl)
{
pcs.removePropertyChangeListener(pcl);
}
}
****************************************************************************
****
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 11, 2002 8:07 PM
Subject: Re: JESS: problem using definstance
> I think Vikram Chhibber wrote:
> [Charset iso-8859-1 unsupported, filtering to ASCII...]
> > Hello,
> >
> > I am facing a problem using definstance in my Java code.
> ...
> > My Item class is supporting the use of
java.beans.PropertyChangeListeners
> > requirement as stated in the example that comes with Jess.
> > But, it seems that the knowledge base is unable to update itself when
the
> > state of Item is changing.
> > Please tell me where I am going wrong.
> >
>
> The simplest explanation is that your property change notification
> doesn't work correctly. Either events aren't sent when properties
> change, or there is something wrong with the events that do get
> sent. We'd have to see the Item class to be able to say more.
>
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research Phone: (925) 294-2154
> Sandia National Labs FAX: (925) 294-2234
> Org. 8920, MS 9012 [EMAIL PROTECTED]
> PO Box 969 http://herzberg.ca.sandia.gov
> Livermore, CA 94550
>
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
>
--------------------------------------------------------------------
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]
--------------------------------------------------------------------