I think Dusan Sormaz wrote:
> Jess> (fact-slot-value (fact-id 2) radius)
> 5.5
> Jess> (modify (fact-id 2) (radius 8.0) )
> <Fact-2>
> Jess> (fact-slot-value (fact-id 2) radius)
> 5.5
> Jess> (call (fact-slot-value (fact-id 2) OBJECT) getRadius)
> 8.0
Assuming this is a dynamic definstance (should be, or there's no
reason why these would be out of synch) Jess is relying here on a
proper implementation of PropertyChangeEvents in the JavaBean class,
so I'd check those for correct operation.
Is there any reason why fact is not updated automatically, if fact is changed. Using property change event I need to go and modify all setters to include jess update, this would make it messy if java object is used outside of jess.
I understand that property change event would be required if I change java object directly, but by 'modify' I say that I want to change fact.
> Another related question. If I use shadow facts, and then Assert them in
> RHS of the rule, is corresponding java object created autoimatically?
Nope, doesn't work that way.
why not? this is completely opposite action from modify. If shadow fact is modified only underlying object is changed, if it is asserted only fact is asserted??
---------------------------------------------------------
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]
--------------------------------------------------------------------
* Du�an �ormaz, PhD, Associate Professor
* Ohio University
* Industrial and Manufacturing Systems Engineering Department
* 277 Stocker Center, Athens, OH 45701-2979
* phone: (740) 593-1545
* fax: (740) 593-0778
* e-mail: [EMAIL PROTECTED]
* url: http://www.ent.ohiou.edu/~sormaz
***************************************************************************
