Hello, i’m actually working on jme3 and it’s my first project on this framework but don’t really care
I have a problem because in order to move batched geometries separetely from each other i have to attach a control per Node so i decide to make an array of Node.
My problem is that when i want to attach some control to my array of node easy as :
It result in a null pointer exception.
I try different things as checking my “counter” b (even if it will be because of that it would be and array bound of exception) but nothing change.
So i try to attach my control to a single node not in an array and it work well so i conclude that’s a problem with node array.
If anyone have an idea it will help me a lot because declaring 60 Nodes one by one is pretty dirty and would like to avoid it
So, you don't even set the nodes first? ie: face_front[b] = new Node()
Trying to learn Java at the same time as learning 3D programming is like trying to learn to ride a bike while also trying to learn to shave with a straight razor. Better done separately.
Thanks for your remark that’s really constructive.
Excepting that i’m not really learning java, that’s not my first java app but with this kind of remark i don’t think you know the fact that when you are writing so many lines, one stupid things like this could turn you crazy because you are sure to have done the right thing so you ask a friend with a new eye and he find that stupid error. But you are probable a kind of programmer which never do error because he’s tired.
Well i will don’t really pay much longer attention to that and i will even thank you for your help despite of your condescencion.
Oh okay i understand, but i'm not really used to this "judgy" atmospheres furthermore for a stupid mistake like this i'm just enough pissed against me :)
As you said, maybe you were tired. Maybe wait until you look upon code with fresh and rested eyes before posting.
I’m not trying to be judgmental. It sounds harsh when I tell people they should learn Java better but really I’m trying to prevent them from getting needlessly discouraged. There are a hundred easier ways to start development.
For the record, all of the evidence was there even if it was caused by sleepiness:
-no importance given to the reporting of the exception (a big beginner mistake)
-inability to instantly judge the cause of a NullPointerException (almost without fail a beginner mistake since these are the single easiest exception to deal with)
-not automatically thinking to allocate the members of the array
-not thinking to do 20 seconds of debugging before writing a long forum post that clearly took more than the time it would have taken to debug.
Hopefully, if you (as a Java developer with more experience than we thought) look at that evidence you will see why it was easy to think you might be new to Java. I meant no offense.