RE: JESS: [EXTERNAL] Adding facts that are instances of from-class deftemplates
"Friedman-Hill, Ernest" <[email protected]> Thu, 16 May 2013 14:24:52 +0000
| Newsgroups | gmane.comp.java.jess |
|---|---|
| Message-ID | <[email protected]> |
The thing is that after this code: (deftemplate Person (declare (from-class Person))) (bind ?f (assert (Person (name "Henrique") (age 38)))) There's no way to transfer those property values to a Person object; i.e.= , if you then said (modify ?f (OBJECT (new Person))) Then the Person's name and age would NOT be "Henrique" and "38"; they'd b= e something else. The only way to get a shadow fact and a Java object syn= ced up automatically is to let Jess copy the properties to the fact from = the object. -------------------------------------------------------------------- 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]= . --------------------------------------------------------------------