I think Greg Biegel wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > Hi, > > Is there a way to pass a reference to the current instance of the rule > engine from Jess, to a Java object. I tried using the 'this' keyword, but > doesn't seem to work. So basically, I would like to construct a Java object > from within Jess, but be able to call back to Jess from the object. >
The (engine) function returns the Rete object that the invoking Jess code is running in; so (bind ?o (new MyObject)) (?o mySetJessEngineMethod (engine)) would create an instance of MyObject, and call the imaginary mySetJessEngineMethod method, passing a reference to the Rete object as an argument. --------------------------------------------------------- Ernest Friedman-Hill Science and Engineering PSEs Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------