Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32638
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2017-02-16 01:53 -0800 |
| Message-ID | <bcd07ea6-93e9-4544-bb05-e09ff1e0e5fa@googlegroups.com> (permalink) |
| Subject | Programming strategies |
| From | jonas.thornvall@gmail.com |
I have a script using arrays where each entry points to x other array entries. I think i made the mistake to led the element index itself represent the node number/index. Since i autogenerated my graph and nodes i did not really think i thru. But now that i started to build a simple edit tool for the graph the problem become appearant. When i remove a node splice all following nodes get relabeled, so the linking of nodes totally become garbeled up. I could enforce a label/attribute called nodeindex upon the array that is probably easy to achieve, or i could do a reorder of the linkings it seem alot more job. This type of problem must been common in the old register days with use of multidimensional arrays, how was it solved back then and how is it solved today with objectoriented programming? Is there some objectoriented approach that make these kind of index issued problematics dissapear?
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Programming strategies jonas.thornvall@gmail.com - 2017-02-16 01:53 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-17 02:22 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-17 03:39 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 04:46 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 05:03 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 05:20 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 05:34 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 05:58 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 07:16 -0800
Re: Programming strategies jonas.thornvall@gmail.com - 2017-02-18 12:14 -0800
csiph-web