=================================================================== RCS file: /home/cvs/OpenXM/src/OpenMath/PolyCalc.java,v retrieving revision 1.8 retrieving revision 1.10 diff -u -p -r1.8 -r1.10 --- OpenXM/src/OpenMath/PolyCalc.java 2000/01/28 06:22:01 1.8 +++ OpenXM/src/OpenMath/PolyCalc.java 2000/04/02 19:24:40 1.10 @@ -1,5 +1,5 @@ /** - * $OpenXM: OpenXM/src/OpenMath/PolyCalc.java,v 1.7 1999/11/19 08:49:06 tam Exp $ + * $OpenXM: OpenXM/src/OpenMath/PolyCalc.java,v 1.9 2000/03/16 12:28:42 tam Exp $ */ import JP.ac.kobe_u.math.tam.OpenXM.*; @@ -119,20 +119,10 @@ class PolyCalc extends Applet implements ActionListene public void run(){ // for debug try{ while(true){ - CMO tmp; + OXmessage tmp = oxm.receive(); + textarea.append("=> "+ tmp +"\n"); Thread.yield(); - - switch(oxm.receiveOXtag()){ - case OpenXM.OX_COMMAND: - oxm.receiveSM(); - break; - - case OpenXM.OX_DATA: - tmp = oxm.receiveCMO(); - textarea.append("=> "+ tmp +"\n"); - break; - } } }catch(java.io.IOException e){} } @@ -146,9 +136,9 @@ class PolyCalc extends Applet implements ActionListene }else if(arg.equals("grobner base")){ try{ debug("poly A: "+ poly1.getText()); - oxm.sendCMO(new CMO_STRING("[[("+ poly1.getText() +") ("+ poly2.getText() +")] (x,y)] gb")); - oxm.sendSM(new SM(SM.SM_executeStringByLocalParser)); - oxm.sendSM(new SM(SM.SM_popString)); + oxm.send(new CMO_STRING("[[("+ poly1.getText() +") ("+ poly2.getText() +")] (x,y)] gb")); + oxm.send(new SM(SM.SM_executeStringByLocalParser)); + oxm.send(new SM(SM.SM_popString)); }catch(java.io.IOException e){ }catch(MathcapViolation e){ } @@ -180,8 +170,8 @@ class PolyCalc extends Applet implements ActionListene */ oxm = new OpenXM(host,ControlPort,DataPort); textarea.append("Connected.\n"); - oxm.sendCMO(new CMO_STRING("(cohom.sm1) run ;\n")); - oxm.sendSM(new SM(SM.SM_executeStringByLocalParser)); + oxm.send(new CMO_STRING("(cohom.sm1) run ;\n")); + oxm.send(new SM(SM.SM_executeStringByLocalParser)); thread = new Thread(this); thread.start();