I think Alexander Lamb wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> As in subject, what is the recommended way of doing?
> 
> Indeed, in the pump example, it is written:
> 
>     Pump p = new Pump("MAIN", t);
>     
>     // Tell Jess about them
>     Funcall f = new Funcall("definstance", rete);
>     f.add(new Value("pump", RU.ATOM));
>     f.add(new Value(p));
>     f.execute(rete.getGlobalContext());

This was written before there was a Rete.definstance() method; when
definstances were first added, they were optional because they
required the JDK 1.1 APIs, and the rest of Jess would still work with
JDK 1.0 without them. Rete.definstance() was added later.

>
> What is different with (in my code):
> 
>       rete.definstance("userSession",this,true);

This is a little more efficient, and of course, more concise. In
general, if there's a method like Rete.definstance(), or Rete.run(),
it's better to use it directly than to build a Funcall or call
executeCommand(). Almost always if there's a Rete.xxx() method and
an (xxx) function in Jess, then (xxx) is implemented by calling
xxx(). 




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