From 66900c7fe7a009a95d7a16c005830a6c1312d0ee Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 28 Jul 2012 19:04:39 +0200 Subject: [PATCH] ipa: Make the IPADispatcher automatically initialize the object Update the code. --- IPADispatcher.st | 9 ++++++++- contrib/Test.st | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/IPADispatcher.st b/IPADispatcher.st index 260eecf..a521c62 100644 --- a/IPADispatcher.st +++ b/IPADispatcher.st @@ -22,8 +22,15 @@ Object subclass: IPADispatcher [ + IPADispatcher class >> new [ + + ^ super new + initialize; + yourself + ] + initialize [ - + handlers := Dictionary new. ] diff --git a/contrib/Test.st b/contrib/Test.st index d2bedee..634ded3 100644 --- a/contrib/Test.st +++ b/contrib/Test.st @@ -31,7 +31,6 @@ Eval [ muxer := IPAMuxer initOn: socket. dispatcher := IPADispatcher new. - dispatcher initialize. ipa := IPAProtoHandler new. dispatcher addHandler: IPAConstants protocolIPA on: ipa with: #handleMsg:.