Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37163
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-08-31 17:24 -0700 |
| References | <8910e5f0-4fc9-417e-a5c8-1bec8693194a@googlegroups.com> <1a1cdb95-7403-42ad-a6e5-0104f2665ccb@googlegroups.com> |
| Message-ID | <ce4a665d-210f-49e6-a6ed-5191cbdbb91a@googlegroups.com> (permalink) |
| Subject | Re: Object iterators |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
Den söndag 1 september 2019 kl. 02:17:27 UTC+2 skrev Jonas Thörnvall:
> Den söndag 1 september 2019 kl. 02:12:59 UTC+2 skrev Jonas Thörnvall:
> > Well they probably have their use, but i've been googling on web midi api for some months looking for howto ***set*** inputs iterator to a single port.
> >
> > inputs = mid.inputs.values();
> >
> > for (var input = inputs.next();
> > input && !input.done;
> > input = inputs.next()) {
> > // each time there is a midi message call the onMIDIMessage function
> > input.value.onmidimessage = onMIDIMessage;
> > }
> >
> > I can't find a single example where one set a single input port without looping thru.
> >
> > I do not want to read all inputs port using the iterator, i just want to set one input say port 3.
> >
> >
> > I would prefered the inputs in an indexed array, because i just do not get howto pick a single port from the input object iterator.
>
> https://www.smashingmagazine.com/2018/03/web-midi-api/
I think i get that this create a listener on port of input.
input.value.onmidimessage = onMIDIMessage;
But i do not fucking get howto set input without iterating thru inputs....
And that seem weird to me.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-31 17:12 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-31 17:17 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-31 17:24 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 02:53 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 02:59 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 03:07 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 03:20 -0700
Re: Object iterators John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-01 11:59 +0100
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 05:54 -0700
Re: Object iterators John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-02 11:08 +0100
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-01 12:54 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-02 02:36 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-02 10:16 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-02 10:19 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-02 10:30 -0700
Re: Object iterators Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-03 23:26 -0700
Re: Object iterators 1975.nenad@googlemail.com - 2020-05-24 04:21 -0700
csiph-web