Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32612
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2017-02-11 23:12 -0800 |
| References | <63222c13-59bb-4187-921e-c9c8410d2492@googlegroups.com> |
| Message-ID | <e9ee41db-d2b7-444d-9d37-25f3a7eb41b8@googlegroups.com> (permalink) |
| Subject | Re: Array elements and "subarrays?" internal dependencies |
| From | jonas.thornvall@gmail.com |
Den söndag 12 februari 2017 kl. 07:50:06 UTC+1 skrev jonas.t...@gmail.com:
> arr[m] ={nodelinks : [], hold : false, rposX : 0, rposY : 0, rwidth : 10, rheigth : 10, rcolor : "red" , bcolor : "green"};
> printnode[m]=m;
>
>
> I thought i would be smart to have an array with nodes and subarray? with nodelinks, directly attached upon the array element index without using a nodeindex attribute.
>
> But now as i need to splice elements i rearrange the elementindex=nodeindex unwillingly without rearrange the nodelinksindexes.
>
> There is probably no way to deal with this other than go back to use the attribute nodeindex off array?
>
> Because i guess there is no smart way to let the sub indexing of nodelinks[] be dependent upon the indexing of arr[]?
>
> Well that was not very smart of me, but thought i did save some labeling.
>
> I must say i am a bit confused by the terminology should i refer to array above as an array or an object? And then what is nodelinks an attribute or a property of arr, or a subarray?
>
> Someone ones told me there is no multidimensional arrays in javascript, well it looks like one.
Well i could scan the whole array with subindexes and try to fix the linkings "but it do get confusing because all the forward changes and their relations to the linkings" and it seem like ***alot*** harder excersise than just throw in nodeindex again...
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Array elements and "subarrays?" internal dependencies jonas.thornvall@gmail.com - 2017-02-11 22:50 -0800 Re: Array elements and "subarrays?" internal dependencies jonas.thornvall@gmail.com - 2017-02-11 23:12 -0800 Re: Array elements and "subarrays?" internal dependencies jonas.thornvall@gmail.com - 2017-02-12 00:24 -0800 Re: Array elements and "subarrays?" internal dependencies John Harris <niam@jghnorth.org.uk.invalid> - 2017-02-12 11:21 +0000
csiph-web