Sorry I haven't made it clear, this is my class definition, it does have
the required method in exactly the form as some examples.
private int level;
// set/get methods for the test field
public void setLevel(int n) {
pcs.firePropertyChange("level", this.level,
this.level=n);
}
public int getLevel() {
return level;
}
// java bean support
private PropertyChangeSupport pcs = new
PropertyChangeSupport(this);
public void
addPropertyChangeListner(PropertyChangeListener p) {
pcs.addPropertyChangeListener(p);
}
public void
removePropertyChangeListener(PropertyChangeListener p) {
pcs.removePropertyChangeListener(p);
}
>>>-----Original Message-----
>>>From: [EMAIL PROTECTED]
>>>[mailto:[EMAIL PROTECTED] On Behalf Of Ernest
>>>Friedman-Hill
>>>Sent: 13 March 2007 16:06
>>>To: [email protected]
>>>Subject: Re: JESS: property change listners
>>>
>>>
>>>On Mar 13, 2007, at 11:46 AM, Song W. wrote:
>>>
>>>> Hi All,
>>>>
>>>> Not sure whether my previous message has been sent correctly,
>>>> apologize if you have seen this message,
>>>
>>>I don't think the previous one went out.
>>>
>>>> Jess reported an error in routine DefinstanceList.definstance
>>>> while executing (definstance opt ?a dynamic).
>>>> Message: Obj doesn't accept PropertyChangeListeners.
>>>> Program text: ( definstance opt ?a dynamic ) at line 7.
>>>>
>>>> Nested exception is:
>>>>
>>>TestBean.addPropertyChangeListener(java.beans.PropertyChangeListener
>>>
>>>
>>>Jess is telling you that to use a dynamic definstance, your
>>>Bean has to have a "public void addPropertyChangeListener
>>>(PropertyChangeListener)" method, but your class doesn't
>>>seem to have such a method.
>>>
>>>---------------------------------------------------------
>>>Ernest Friedman-Hill
>>>Advanced Software Research Phone: (925) 294-2154
>>>Sandia National Labs FAX: (925) 294-2234
>>>PO Box 969, MS 9012 [EMAIL PROTECTED]
>>>Livermore, CA 94550 http://www.jessrules.com
>>>
>>>--------------------------------------------------------------------
>>>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]
--------------------------------------------------------------------