Basic HTML version of Foils prepared

Foil 14 Java API - code example II Contd

From General Tango API Java JavaScript and C Tango Tutorial San Diego MRA -- June 26 27 98 Datemod;June 26 98. by TangoInteractive Team


public boolean action(Event e,Object o) {
if (o instanceof TextField) {
String msg=un+" : "+tf.getText();
byte[] t=new byte[msg.length()];//create byte table
msg.getBytes(0,msg.length(),t,0);//string to byte[]conversion
AppEventMessage em=new AppEventMessage(Const.DATA,t);
// The above is a new message
send(em); //TANGO API call
tf.setText("");
return true;
}
else
return super.action(e,o);
}



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998