[Tdg] Event System Updates
Alex Norman
alex at neisis.net
Sun Aug 19 12:32:09 PDT 2007
On 0, Graham Wakefield <lists at grahamwakefield.net> wrote:
>
> On Aug 19, 2007, at 9:40 AM, Alex Norman wrote:
>
> >On 0, Graham Wakefield <lists at grahamwakefield.net> wrote:
> >>Here's a question for last week's model - how do events specify which
> >>processor to use?
> >>
> >>E.g. sending OSC when multiple network ports exist, or drawing a line
> >>when multiple graphics contexts exist.
> >>Is it oscport3->send(new OSCEvent(...)) rather than hub->send(...) ?
> >>Or is it hub->send(new OSCEvent(oscport3, ...)) ?
> >>Or is it hub->setContext(oscport3); hub->send(new OscEvent(...)) ?
> >
> >I've always thought that with OSC you should not specify the port
> >that it is
> >sent to, that the namespace should be registered with your "hub" or
> >whatever.
> >so everything like:
> >/mint/* goes to port x
> >/myspecialthing/* goes to port y
> >etc.
>
> But what if I want to send OSC messages to different clients? I need
> to specify the port, or at least the abstraction OSCSender *.
No, you don't... well, not if you've registered the namespace like I'm talking
about... basically, the OSC system knows that /blah/* goes to port x and /foo/*
goes to port y and so you just create a /blah/toast message and when you send it
it gets sent to the correct port. I'm not saying that this is how it HAS to
happen, but I think that it is pretty ideal. It requires that you set things
up at the beginning to say that /blah goes to port x, but then you don't have to
deal with ports after that, and if you want to change the port that /blah/* goes
to, or if you want to add another port for getting /blah/* you can do that.. if
we have to specify ports when we create messages that would be a real pain.
example:
say that /foo/* all goes to my custom app [running outside of mint].
say that I later decide I want to send /foo/* to an OSC recorder as well, so
that I record what I do and I can then play back the OSC events. With this
namespace registered system I can just register another port for that
namespace.. if I specify the port when I create the osc message I am out of
luck [unless I want my application logic to get much more complicated].
>
> Or, what if I want to send graphics commands to different windows? I
> need to specify the graphics Processor to handle them.
Hmm, it seems that these graphics commands would be part of the contents of a
window command, and in that window command you'd specify the receiver.
-Alex
>
>
>
>
> grrr waaa
> www.grahamwakefield.net
>
>
>
>
> _______________________________________________
> Tdg mailing list
> Tdg at mat.ucsb.edu
> http://zydeco.mat.ucsb.edu/mailman/listinfo/tdg
More information about the Tdg
mailing list