Hi David and all,
Well, this is why we do beta-testing, I guess... Actually, this one is
embarrassing. I left a bit of debug code in the file jess/Funcall.java
which is keeping (retract) from working like (undefinstance). On line
475 of that file, you will see the following:
if (uf != null && (true == false))
you should change this to (obviously)
if (uf != null)
Thanks for the report and your patience.
I think David Young wrote:
>
> Hello. I was able to write some code that illustrates the
> (definstance) problem in Jess 41b4. After loading and invoking (run),
> the following form will cause (definstance) to return FALSE:
>
> (definstance rocky (bag get (bag find rockies) rocky))
>
> Thanks.
>
> ;;
> ;; Jess code from file 'schtum.clp'...
> ;;
>
> (defclass rocky Rocky)
>
> (deffunction register-instance ()
> (bind ?obj (new Rocky))
> (bind ?bag (bag create rockies))
> (bag set ?bag rocky ?obj)
> (definstance rocky ?obj))
>
> (defrule schtum
> =>
> (register-instance))
>
> (defrule match
> (rocky)
> =>
> (printout t "found rocky" crlf))
>
> (defrule cleanup
> (declare (salience -50))
> ?fact <- (rocky)
> =>
> (retract ?fact))
>
> (defrule halt
> (declare (salience -1000))
> ?fact <- (initial-fact)
> =>
> (retract ?fact)
> (assert (initial-fact))
> (halt))
>
> ;;
> ;; Class code for Rocky...
> ;;
>
> import java.beans.PropertyChangeListener;
> import java.beans.PropertyChangeSupport;
>
> public final class Rocky {
> public void addPropertyChangeListener(PropertyChangeListener pcl)
> {
>
> }
>
> public void removePropertyChangeListener(PropertyChangeListener pcl)
> {
>
> }
> }
>
> --
>
> -------------------------------------------------------------
> David E. Young
> Fujitsu Network Communications "I claim not to have controlled
> ([EMAIL PROTECTED]) events, but confess plainly
> that events have controlled me."
> -- Abraham Lincoln (1864)
> "Apology is Policy"
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (510) 294-2154
Sandia National Labs FAX: (510) 294-2234
Org. 8920, MS 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------