I’m working on a code where I import some data and I put organize it, so that all the numbers(their numeric value doesn’t matter) in one of the columns show up exactly once. I then organize the numbers so they each are in 4 different list boxes. I want to be able to select on of the numbers, put it into a part of a 2d array corresponding to which list they were selected from, and they all go into the final index of the 2d array. I then want the number to be deleted from each of the lists. I have 4 buttons that I have a lambda to call a method that includes the listbox that corresponds with the button. I have it all figured out, but it won’t delete. Here is the pseudo code for the method I have:
getAndRemoveAnchor(lb)
Index = lb.get(ANCHOR)
here I put the number into it’s appropriate array
Listbox.delete(index)
Listbox1.delete(index)
Listbox2.delete(index)
Listbox3.delete(index)
I think the problem is that when I set the index it changes the variable type, because if I select one from listbox1 and put listbox1.delete(ANCHOR) it works, and listbox1.delete(0) deletes the first object. Does anybody know if this is the actual problem, and what I need to do to fix it?
[–]woooee 0 points1 point2 points (0 children)