Hi,
I'm writing an external, and I want it to have multiple named receivers that do different things (something that seems trivial for an abstraction but rather tricky for an external).
I worked out how to have multiple 'anything' inlets using a proxy class (modelled after the [list ...] internals), but I'm stuck when it comes to multiple 'anything' receivers.
If i just do:
pd_bind(myobject, gensym("blah")); pd_bind(myobject, gensym("glah"));
then myobject can't distinguish whether the message got sent to "blah" or "glah", which is loss of information that I need.
So, I somehow need to create fake objects (one for each receiver) that forward the messages to the real object (adding in some extra info unique to the receiver).
The problem is I don't know how to create the fake objects. Anyone have any ideas / example code / tips to offer?
Claude
PS:
It would have been nicer if instead of:
pd_bind(object, symbol)
there was also something like:
pd_bind_method(object, symbol, method)
or even better:
pd_bind_method(object, symbol, method, methoddata)