Hi,
I'm learning Java and Jess, all together. I'm sorry for the question if it
is trivial.
The thing is that I need generate diferents "assert" when I select diferents
items from the combo. In the code I'm sendig the item selected is hadcoded
"r.executeCommand("(assert(Myassert Yes))");"
The problen is that I need to  use " Rete r = new Rete();" and every time
that and item is selected the previous assert is loosen.
The same occurs if I want to see the rete net with
"r.executeCommand("(view)");", i get nothing because the Rete r = new
Rete();" that i ned to use when I use "r.executeCommand("(view)");"
If  I don't  use " Rete r = new Rete();"  every time that ia need to do
r.executeCommand or r.executeCommand("(view)"); I get a lot of errors.
So actualy I can generate only one assert.

Could somebody help me??

Thanks.

**********************************************HERE IS THE
CODE*****************************************************
        public void actionPerformed(ActionEvent e) {
        String command = e.getActionCommand();
        if (command.equals("combo")) {
            String item = cmbCombo0.getSelectedItem().toString();
            String item_selected;
            if (item.equals("Yes" )){
            System.out.print("He said Yes!!!");
                try
                        {
                Rete r = new Rete();
                        r.executeCommand("(watch all)");
                        r.executeCommand("(batch reglas.clp)");
                r.executeCommand("(assert(Myassert Yes))");
                        r.executeCommand("(run)");
                System.out.println(r.fetch("x"));
                        }
                        catch (JessException ex)
                        {
                        System.err.println(ex);
                        }

                                   }else{
                    //do nothing
                 }
           }
public void atenderEventoBotonRete(){
        try
                {
                         Rete r = new Rete();
                        r.executeCommand("(view)");
        }
                catch (JessException ex)
        {
          System.err.println(ex);
        }


Hernan Flores
Mantenimiento FA.PI.TA
FV. S.A. Planta Villa Rosa
E-mail: [EMAIL PROTECTED]

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