[Edit: Never mind ... a very dumb post from me, .... had been coding 16 hours straight everyday for several weeks and that took its toll on me]
I got some crashes and started investigating. It boiled down to the loop in my callback function not being called as expected.
I don't know what's really going on anymore, are loops not allowed in callback functions or am i doing something seriously retarded and just can't see it
This code doesn't even get inside the for-loop and i just don't understand why. ... > && <= should get into the loop
Anyone knows whats happening?
Java/Android and while the basics and logic remain intact, much of this code is simplified so it can be understood
char charToIntArry[];
int u=0;
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch(requestCode){
case PICKFILE_RESULT_CODE:
if(resultCode==RESULT_OK){
...
...
Log.v(tag, "(Path.length()-5) "+((Path.length()-5)));
charToIntArry = new char[((Path.length()-5)-44)];
for(u=0; u<(filePath.length()-5) ; u++){ //dynamic but simplified to static values
if((u>44)&&(u<=(filePath.length()-5))){
//Log.v(tag, "(Path.length()-5)-44 "+((Path.length()-5)-44)+" u "+u+" Path.charAt(u) "+Path.charAt(u) );
charToIntArry[u] = Path.charAt(u);
}
}
...
...
Log.v(tag, "u "+u ); // u remains at 0 (see output)
...
...
}
break;
}
}
output completely misses the loop
V/tag : (Path.length()-5) 47
V/tag : u 0