Hello all,
 
I'm having trouble using the Jess command store() from Java to insert Java objects as facts into a Rete engine. The example in the user manual works, when calling Java's core packages i.e..
 
app.rete.store("BUTTON", new java.awt.Button("Press Me!"));
app.rete.executeCommand("(defclass button java.awt.Button)");
app.rete.executeCommand("(definstance button (fetch BUTTON) static)");
 
 
As expected, these commands create a deftemplate with the requisite slots for an instance of Button, and creats a fact with the slots filled. However, when storing a class defined in my program (here RelevantDate), only one slot seems to be created (app.date1 is an instantiated instance of RelevantDate class
 
app.rete.store("DATE1", app.date1);
app.rete.executeCommand("(defclass dates RelevantDate)");
app.rete.executeCommand("(definstance dates (fetch DATE1) static)");
 
The resulting deftemplate:
 
(deftemplate dates extends __fact "$JAVA-OBJECT$ RelevantDate"
 (slot class (default <External-Address:jess.SerializablePropertyDescriptor>))
 (slot OBJECT (type 2048)))
 
I have no trouble retrieving this object direct from the Java code, but I need a way to create individual slots for the variables in a RelevantDate object in Jess. Can anyone help?
 
Thanks in advance, Scott Duguid


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--------------------------------------------------------------------- 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] ---------------------------------------------------------------------

Reply via email to