Hi Jess Users!
I am seeing a strange error in the following test CE :
a) Works OKAY:
(test (eq (call ?*object* getValue) (get-member ?*constants* CONST_1)) )
b) Gives NullPointer ERROR:
(test (or (eq (call ?*object* getValue) (get-member ?*constants* CONST_1))
(eq (call ?*object* getValue) (get-member ?*constants* CONST_2))))
All variables have the same values in both cases.
I stepped through Jess (using 5.0a4 )code to the line where it fails:
jess\Funcall.java:
class ExtractGlobal implements Userfunction, Serializable {
....
public Value call(ValueVector vv, Context context) throws
ReteException
{
return context.findBinding(vv.get(1).stringValue()).m_val;
<================
}
}
in jess\Context.java:
Binding findBinding(String key)
{
Context c = this;
while (c != null)
{
Binding b = (Binding) c.getBindings().get(key);
if (b != null)
return b;
else
c = c.m_parent; <===== NULL ????
}
return null;
}
When, in the case b), it is trying to find bindings for ?*object* second
time around in the while loop c is null, whereas in the case a) it is
getting the correct value. Any ideas what the problem might be?
Thanks,
-- Jacek
---------------------------------------------------------------------
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]
---------------------------------------------------------------------