I think Rosely Bin Kumoi wrote: > I know that from the documentation it is possible to send a java object from > Java to Jess and reading it back in Java: > > Rete r = new Rete(); > Vector vector1 = new Vector(); > r.store("VECTOR", vector1); > Value value = r.fetch("VECTOR"); > Vector vector2 = (Vector)value.externalAddressValue(r.getGlobalContext()); > > My question is: > (1) how to fetch the vector object in Jess,
There are (fetch) and (store) functions in Jess, described in the same place in the manual that discusses Java store() and fetch(); if you store() something in Java, you can also (fetch) it in Jess; i.e., after the above code, you can say (bind ?vector (fetch VECTOR")) and have a reference to the same Vector object. > (2) run any method from the object for example the addElement() > method again in The manual does discuss calling Java methods from Jess (in chapter 2); it's easy. Basically it just looks like (?vector addElement "Hello") --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research 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] --------------------------------------------------------------------