I think Mark Nahabedian wrote:
>
> (deffunction test-equiv (?type ?thing1 ?thing2)
> (bind ?e (run-query equivs-of-type ?type))
> (while (?e hasMoreElements)
> (bind ?elt (call ?e nextElement))
> ;; The document isn't clear about why this is needed
(An aside: the Jess 6 manual is better. Note that Jess 5 will be
officially obsolescent as of Monday, when 6.0 final will be released.)
> (bind ?fact (call ?elt fact 1))
> (bind $?set (fact-slot-value ?fact set)) ; <<<<< HERE?
?fact is a jess.Fact object, but the fact-slot-value function in Jess
5 takes an integer fact-id as an argument, not a Fact object, hence
the "no overloading" error. Either 1) upgrade to Jess 6, where your
code would work (since then fact-slot-value does indeed accept
fact objects) or look in jess/scriptlib.clp at the implementation of
fact-slot-value so you can craft a version which -does- take a Fact as
an argument.
It was just this kind of confusion that prompted me to change
pattern-bindings from ints into Facts in Jess 6.
> (if (and (member$ ?thing1 $?set)
> (member$ ?thing2 $?set))
> then
> (return ?fact)))
> (return FALSE))
...
>
> Jess exception: Jess reported an error in routine call
> while executing (call (engine) findFactByID ?__fact-id)
....
> while executing defrule faces-and-segments-at-crosspoint.
> Message: No overloading of method 'findFactByID' in class jess.Rete I can call
>with these arguments: (call (engine) findFactByID ?__fact-id).
>
>
---------------------------------------------------------
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]
--------------------------------------------------------------------