aboutsummaryrefslogtreecommitdiff
path: root/examples/TestIvy.java
diff options
context:
space:
mode:
authorjestin2004-07-27 16:21:24 +0000
committerjestin2004-07-27 16:21:24 +0000
commit9ab98e8b79688821f85649fa3a04137f83467b73 (patch)
treeec55f2feb85355cadaf901bd561cd37444ae83ba /examples/TestIvy.java
parent9eff9570e518daccec02dd62593294341f4c36b6 (diff)
downloadivy-java-9ab98e8b79688821f85649fa3a04137f83467b73.zip
ivy-java-9ab98e8b79688821f85649fa3a04137f83467b73.tar.gz
ivy-java-9ab98e8b79688821f85649fa3a04137f83467b73.tar.bz2
ivy-java-9ab98e8b79688821f85649fa3a04137f83467b73.tar.xz
clean up the examples to abide to the new API
Diffstat (limited to 'examples/TestIvy.java')
-rw-r--r--examples/TestIvy.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/TestIvy.java b/examples/TestIvy.java
index 3ab0cc0..7bc96d0 100644
--- a/examples/TestIvy.java
+++ b/examples/TestIvy.java
@@ -45,7 +45,7 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
regexp=tfRegex.getText();
tfBound.setText("Bound to: " +regexp);
regexp.trim();
- regexp_id = bus.bindMsg(regexp,TestIvy.this);
+ try { regexp_id = bus.bindMsg(regexp,TestIvy.this); } catch (IvyException ie) { }
tfRegex.setText("");
pack();
}
@@ -59,8 +59,11 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
int count;
String tosend = tfSend.getText();
tfSend.setText("");
- count = bus.sendMsg(tosend);
- append("Sending '" + tosend + "' count " + count );
+ try { count = bus.sendMsg(tosend);
+ append("Sending '" + tosend + "' count " + count );
+ } catch (IvyException ie) {
+ append("*Error* cant't send " + tosend );
+ }
}
});
p.add(tfSend,BorderLayout.CENTER);
@@ -79,7 +82,7 @@ class TestIvy extends Frame implements IvyApplicationListener,IvyMessageListener
public void connect(IvyClient client) { append(client.getApplicationName() + " connected " ); }
public void disconnect(IvyClient client) { append(client.getApplicationName() + " disconnected " ); }
- public void die(IvyClient client, int id) { System.exit(0); }
+ public void die(IvyClient client, int id,String msgarg) { System.exit(0); }
public void directMessage(IvyClient client, int id, String arg) {
append(client.getApplicationName() + " direct Message "+ id + arg );
}