[javascript-dev] reading from different inlets
Emmanuel Jourdan
c74-mailinglists at e--j.com
Sat May 17 00:46:04 MDT 2008
- Previous message: [javascript-dev] reading from different inlets
- Next message: [javascript-dev] setting up inlets and outlets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 17 mai 08, at 06:34, Danjel van Tijn wrote:
>
> Ok I must be missing something painfully obvious in concept but I
> have been bashing my head on this for a while now.
>
> This should be so simple:
>
> I am making a js object to process a CC# and it's CC value (from a
> CTLIN object). I assume I would do this by defining a js object that
> has 2 inlets? or should it be just 1 inlet?
>
> How do I read the second inlet? This is what I am missing somehow.
In order to read the second inlet, you need a second inlet:
inlets = 1;
Then in your function, you just need to read the contents of the inlet
property (the inlet index starts at 0):
function msg_int(v)
{
if (inlet == 1)
// right inlet
else
// left inlet
}
HTH,
ej
- Previous message: [javascript-dev] reading from different inlets
- Next message: [javascript-dev] setting up inlets and outlets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
