Hi,

There's no neat way to do what you're asking about (at least not in
the current versions of Jess.) What you could do, though, is use Beans
instead of facts. Keep a reference to the Bean available someplace,
and have the item-listener change the properties of the Bean. If the
Bean is definstanced, then it will be available for matching by rules
just as the current facts are -- the rules would likely not need to be
changed. 


I think sintes wrote:
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Hi all ! 
> 
> I'd like to know how to get a fact-id in a 
> function. I create a GUI with awt objects, 
> I add listeners to those objects and when 
> something happens, I'd like to modify the 
> fact involved in the control.
> 
> Here is my sample
> 
> (deffact act (action no))
> ...
> 
> 
> (defrule foo
> ...
> ?ac <- (action yes)
> =>
> ...)
>  
> ...
> 
> (deffunction itemlistener (?event)
> 
> ;;I dunno how to modify the fact action, as 
> I dunno how to get the fact-id 
> 
>  ?bar<-(action no)         ;;?????
> (modify ?bar (action yes)) ;;????? 
> )
> 
> Thank you,
> 
> Bruno SINTES



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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