From 9ab98e8b79688821f85649fa3a04137f83467b73 Mon Sep 17 00:00:00 2001 From: jestin Date: Tue, 27 Jul 2004 16:21:24 +0000 Subject: clean up the examples to abide to the new API --- examples/TestIvy.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'examples/TestIvy.java') 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 ); } -- cgit v1.1