diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-01-11 04:59:27 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-01-11 04:59:27 +0000 |
commit | f1558e3a9297c6a4fefa9d399a7c9d067d859aa3 (patch) | |
tree | d06d5c6cb9badc428a2ed4d3352f7bad6bfbf1f7 /externals/grill/py/scripts | |
parent | ead9ba14ab569e5644e2deeffc436c31b53ea141 (diff) |
added symbol type
fixed incorrect unbinding of instance methods
fixes for symbol type
little restructuring
svn path=/trunk/; revision=2489
Diffstat (limited to 'externals/grill/py/scripts')
-rw-r--r-- | externals/grill/py/scripts/sendrecv.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/externals/grill/py/scripts/sendrecv.py b/externals/grill/py/scripts/sendrecv.py index 0488359b..e3295ab6 100644 --- a/externals/grill/py/scripts/sendrecv.py +++ b/externals/grill/py/scripts/sendrecv.py @@ -43,7 +43,7 @@ class ex1(pyext._class): # no inlets and outlets - _inlets=0 + _inlets=1 _outlets=0 recvname="" @@ -66,21 +66,22 @@ class ex1(pyext._class): if len(args) >= 1: self.recvname = args[0] if len(args) >= 2: self.sendname = args[1] + self.bind_1() + + def bind_1(self): # bind functions to receiver names # both are called upon message self._bind(self.recvname,self.recv) self._bind(self.recvname,recv_gl) - + + def unbind_1(self): + self._unbind(self.recvname,self.recv) + self._unbind(self.recvname,recv_gl) def __del__(self): """Class destructor""" - # you can but you don't need to # unbinding is automatically done at destruction - # you can also comment out the _unbind lines - self._unbind(self.recvname,self.recv) - self._unbind(self.recvname,recv_gl) - pass |