Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34628

Re: DATA Structure one last time

From John G Harris <niam@jghnorth.org.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: DATA Structure one last time
Date 2018-01-22 10:47 +0000
Organization A noiseless patient Spider
Message-ID <86gb6ddabbi3aga2609e2need5absic73r@4ax.com> (permalink)
References (1 earlier) <a111ab7e-9e84-419f-af37-cb227a23a66d@googlegroups.com> <b8a8ec79-ae86-40ad-bc90-aec2a72af2c8@googlegroups.com> <7532beec-4167-49b2-bbad-28920c4d4058@googlegroups.com> <kgl96dda6o6b8kn4j6ut7fj14i4ot7eklq@4ax.com> <f63278fa-0cd4-4681-96b9-455d520f4c6a@googlegroups.com>

Show all headers | View raw


On Sun, 21 Jan 2018 20:03:50 -0800 (PST), Jonas Thörnvall
<jonas.thornvall@gmail.com> wrote:

>Den söndag 21 januari 2018 kl. 19:05:04 UTC+1 skrev John G Harris:
>> On Sun, 21 Jan 2018 04:10:05 -0800 (PST), Jonas Thörnvall
>> <jonas.thornvall@gmail.com> wrote:
>> 
>>     // Add another blank message to the track's midi messages
>> > track[m].midiMess.push({time:0,data0:0,data1:0,data2:0});
>> 
>> I don't remember you saying you wanted to add another object to an
>> array. You just complained that you didn't know how to do it.
>> 
>> 
>> >Fuck you make me tired.
>> 
>> Yes, that's the way to get help.
>> 
>>   John
>
>Well i showed you the structure didn't I?

Life's too short to remember everything you wrote.

>And i asked you howto create a midiMess didn't I?
>If you are a bit clueless of javascript syntax like me, then it ain't going to pop out of your brain by lookin at the structure, howto create a midiMess for that structure?
>
>And why you call track an array, 

I didn't.

>isn't it an object? 

Yes. An array is a special kind of object. It can be treated like
arrays in other programming languages.

But track[m] is an ordinary kind of object. The name "track" is
confusing; "tracks" would be more honest.

>If so what does that make midiMess a subobject? 

midimess is a property of an *element* of the track array, not a
property of track.

>How can you say midiMess is an object and not track?
  <snip>

I didn't. But midiMess is an array object, otherwise you wouldn't be
able to use a push method.

So what did you find difficult : accessing midiMess, or adding another
message to it ?

  John

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 01:50 -0800
  Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 02:09 -0800
    Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 03:35 -0800
      Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 04:10 -0800
        Re: DATA Structure one last time John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-21 18:04 +0000
          Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 20:03 -0800
            Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-21 20:07 -0800
            Re: DATA Structure one last time John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-22 10:47 +0000
              Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-22 04:32 -0800
                Re: DATA Structure one last time John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-22 16:32 +0000
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-22 21:36 -0800
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-23 01:22 -0800
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-23 05:18 -0800
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-23 05:38 -0800
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-23 05:44 -0800
                Re: DATA Structure one last time Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-23 06:07 -0800

csiph-web