[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] More OSCresponder issues
Okay a further couple of things:
When OSCMultiResponder calls value on its nodes, it doesn't call value directly on them, but rather bypasses them and goes to their actions:
<x-tad-smaller> value { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> time, msg;
nodes.do({ </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> node; node.action.value(time, node, msg) });
}</x-tad-smaller>
When doing this it doesn't pass the addr arg for some reason. Is this correct?
Also, I think there's a potential problem with the way in which OSCresponders become nodes in an OSCmultiresponder when you add an OSCresponderNode with the same command. If one calls remove on that OSCresponder, then it will call remove on the set, and because of the way == is defined this will remove the enclosing OSCMultiResponder, which is not the desired behaviour. Am I correct here?
To be honest, I've never understood the point of having a responder class which removes all other responders to the same message when added. Especially given that this could obliterate something automatically added that a class is depending on. Having this adds a lot of complication to the responder system, and saves the user very little work. Am I missing something?
Should we consider simplifying the system to just have OSCresponderNodes and make removing old ones the responsibility of the user if needed?
S.
Scott Wilson wrote:
On 20 Nov 2004, at 17:28, Julian Rohrhuber wrote:
I simply didn't think of it. Please fix it.
--
Changed to the following and committed, which is consistent with OSCresponder:
<x-tad-smaller> value { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> time, msg, addr;
action.value(time, </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>, msg, addr);
}
removeWhenDone {
</x-tad-smaller><x-tad-smaller>var</x-tad-smaller><x-tad-smaller> func;
func = action;
action = { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> time, responder, msg, addr;
func.value(time, responder, msg, addr);
</x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.remove;
}
}
</x-tad-smaller>
S.
_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev