Note that there are some explanatory texts on larger screens.

plurals
  1. POWanted : Theory for Copy, Move in Nodes in Trees (such as Drag and Drop)
    primarykey
    data
    text
    <p>One of my apps maintains a tree of objects, displayed in an outline view. I've implemented a long routine for moving or copying object(s) from one node to another. This routine is invoked, for example, when the user executes a drag and drop in the outline view.</p> <p>It gets to be fun when objects are moved within the same parent. Or when objects are not allowed at certain nodes, although I do allow the user to drop them there, I helpfully adjust their final location. After several weeks, and a few bug fixes during the first few releases, I got this routine to always behave as expected. I think. But I'm not sure, because this method was developed <em>ad hoc</em>. That means: When I found something that didn't work, I fixed it.</p> <p>Currently I'm working on improving its performance in a few corner cases. For example, code which re-indexes all affected nodes immediately after each any object is moved is logically bullet-proof, but costly when the user moves 1000 items in at the head of a node already containing 1000 items.</p> <p>As I look at this code, it seems to me that some computer scientist might at some point have written a textbook chapter or something on this topic, and I should buy that book, read it, rip out my <em>ad hoc</em> code and do it the <em>right</em> way. But I can't find any in a web search. Does anyone know of any such book?</p> <p>Or maybe not. Maybe this is one of those cases where, after all is said and done, each application too different to propose a general solution?</p> <p>Thanks,</p> <p>Jerry Krinock</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload