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


Groups > comp.lang.javascript > #32638

Programming strategies

X-Received by 10.157.38.161 with SMTP id l30mr385067otb.126.1487238823749; Thu, 16 Feb 2017 01:53:43 -0800 (PST)
X-Received by 10.157.12.165 with SMTP id b34mr49700otb.2.1487238823720; Thu, 16 Feb 2017 01:53:43 -0800 (PST)
Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!e137no462446itc.0!news-out.google.com!78ni1669itm.0!nntp.google.com!e137no455983itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.javascript
Date Thu, 16 Feb 2017 01:53:43 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=84.217.168.23; posting-account=kxPkPAoAAACjJi8w0gL9bnyznPzdw9HW
NNTP-Posting-Host 84.217.168.23
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <bcd07ea6-93e9-4544-bb05-e09ff1e0e5fa@googlegroups.com> (permalink)
Subject Programming strategies
From jonas.thornvall@gmail.com
Injection-Date Thu, 16 Feb 2017 09:53:43 +0000
Content-Type text/plain; charset=UTF-8
Xref csiph.com comp.lang.javascript:32638

Show key headers only | View raw


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


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