I think S.S. OZSARIYILDIZ wrote:
>
> Hi,
>
> I've few small questions:
>
> - Is it possible to divide the readme file in smaller peases? It is
> now about 100 pages and slow to view with browser.( Jess Functions +
> Explanation + etc..)
I agree that it is awfully big, and it will be getting bigger. On the
other hand, searching a single document is a lot easier than searching
a hyperlinked glob of documents. I am thinking about the various
possibilities - I'll let you know what I decide to do!
>
> - I try to undefinstance in java but I was not succeed. I tried
> simple pump MainInJava example. As written below any successions
> welcome.
>
Another reader has already posted the solution here. Remeber that the
things you push into the Funcall are the arguments just as they would
appear in a Jess function call - and undefinstance doesn't need the
class name as an argument.
> - Is it possible to have some public methods (or engine linked
> methods) to defclass and definstances and undefinstance to manipulate?
>
I generally leave out things that can be trivially written by the
user, to keep Jess's size down. In this case, you can write a class
called JessUtilities, or some such, with methods like
void undefinstance (Rete engine, Object o)
{
Funcall f3 = new Funcall("undefinstance", engine);
f3.add(new Value("tank", RU.ATOM));
f3.add(new Value(o, RU.EXTERNAL_ADDRESS));
f3.simpleExecute(f3, engine.globalContext());
}
> thanks
> S.S. OZSARIYILDIZ
>
> snip
> ----
>
> Tank t = new Tank("MAIN");
> Pump p = new Pump("MAIN", t);
>
> Value v = new Value(t, RU.EXTERNAL_ADDRESS);
> ...
>
> f = new Funcall("definstance", rete);
> f.add(new Value("tank", RU.ATOM));
> f.add(v);
> f.simpleExecute(f, rete.globalContext());
>
> Funcall f3 = new Funcall("undefinstance", rete);
> f3.add(new Value("tank", RU.ATOM));
> f3.add(v);
> f3.simpleExecute(f3, rete.globalContext());
>
> rete.executeCommand("(run)");
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------