Controlp5 : invocation target exception
in
Contributed Library Questions
•
2 years ago
Hello.
I am using two drop down lists from the controlp5 library. One of them is used to select a file type ".tif, .txt, ... etc". Once I specify the file type in the first drop down list, the second one(arraylist of 6 other dropdown lists) is displaying under 6 different categories, all the files with the specified file type. Each of the 6 lists basically shows the names of files.
Now, as an example, lets says i chose the type ".tif" and I have the other 6 lists showing the names correctly. When I change this to another type, I get the error "invocation target exception".
I cross checked my code and figured the code breaks when one of the 6 lists is attempting to hold lesser elements than what it was, earlier. I assumed this was a problem with how I must have defined the arraylists. But something else was happening here. When I use f.toString() where f is file, to be displayed in the lists, there is no error. The moment I use f.getName() to be displayed in the lists, i get the error. So I am not sure what the problem is.
Thank you, for any help.
Best.
I am using two drop down lists from the controlp5 library. One of them is used to select a file type ".tif, .txt, ... etc". Once I specify the file type in the first drop down list, the second one(arraylist of 6 other dropdown lists) is displaying under 6 different categories, all the files with the specified file type. Each of the 6 lists basically shows the names of files.
Now, as an example, lets says i chose the type ".tif" and I have the other 6 lists showing the names correctly. When I change this to another type, I get the error "invocation target exception".
I cross checked my code and figured the code breaks when one of the 6 lists is attempting to hold lesser elements than what it was, earlier. I assumed this was a problem with how I must have defined the arraylists. But something else was happening here. When I use f.toString() where f is file, to be displayed in the lists, there is no error. The moment I use f.getName() to be displayed in the lists, i get the error. So I am not sure what the problem is.
Thank you, for any help.
Best.
1