User Profile
Collapse
-
Hmm so I solved the problem. It turns out javascript does not like the array that is passed to it by java, so when I tried to make it a 2-D array it broke. I fixed it by copying the contents of the original array that I passed the contents of the tsv file into another array and used that throughout. Any idea why javascript rejected the array from java? -
Yea, when I hard code it like that it seems to work...
But when I check the contents right after I import the lines from the tsv file they come out correct. Even after I invoke the split function its ok, so why would it break in that case?Leave a comment:
-
For now all I'm using is a test.tsv for development and here's the array looks before the split:
Project Name\tDue Date\tDescripti on of the Project\tPeople Working on it
Project 1\t5/10/2010\tlalal\t"J oe, Mary"
Project 2\t5/11/2010\tjs\t"May, Joe"
Project 3\t5/12/2010\tas\t"bill y, greg, andy"
I don't have a public test page yet so I can't really show you guys anythi...Leave a comment:
-
Yea that's the output I expect but unfortunately don't get. The temp arrays all have the same length as I'm inputting from a tsv file that has the same number of columns for the entire document.
Could it be a problem with the way my compiler or javascript settings on my browser? Cause if it works for you guys then there shouldn't be a reason why it doesn't work for me.Leave a comment:
-
gits,
I have attached the result of the code that you pasted above which still gives me the same "undefined" response when I try to access the 2-d array. Initially, the array consists of a line from a tsv file that is parsed in using the java read_in function that I created.
If I try to access the array using the syntax "array[i,j]" I get the problem where each interation of the outer for loop overwrites...Leave a comment:
-
Yea, that's what I was going for cause that's when the contents of the array are first filled. I should have probably said this in the first post but during my debugging attempts I accessed the contents of the array after line 6, and I got the correct output - that is the contents that I brought in with the read_in function. When I try and access the contents in line 30 I get undefined for all index values. So I doubt that line 6 is where my problem...Leave a comment:
-
That's my initializing line, the array has nothing in its contents before that point....Leave a comment:
-
Undefined error when accessing 2-D array contents
Hi,
Every time I try to access the contents of the following array it returns that it is undefined. I have tried multiple variations on accessing the arrays syntax wise but get different errors every time.
When I try to do it the way listed below I get the undefined error I talked about before.
Code:
...Code:var array = new Array(); var i, j, txt; var str = new Array();
No activity results to display
Show More
Leave a comment: