01-21-2013 06:51 AM
i am having list of manager added with five field on it.
for touch event i have made all five field focusable ,
But at scrolling time i want to show only one field in focus, so for each field i am setting the focus on single field using setFocus() method. it is working fine.
But my problem is that some times it is giving null pointer exception.
can any body help me.
01-21-2013 06:59 AM
A little more would be useful. What line is giving the NPE. What object in the line is actually null? Why do you think it should not be null?
If the NPE is not in your code, then what statement is in your code - you can find that by following the stack trace.
01-21-2013 07:10 AM
i am using navigation movement also but it for some othe field.
while i am debuging it is sowing on return super.navigationMovement(dx, dy, status, time); line in navigationmovement method
and touchevent ==null
i am not able to find out why it is.
01-21-2013 07:30 AM
Sorry I need more. Perhaps someone else can figure it out with just this information.
I have had issues with 'setFocus' when it is being invoked as part of some other processing, say like a scroll. To get round this I have typically moved the setFocus into an invokeLater. You might try this. But that is just a guess based on insufficient evidence.
01-21-2013 07:45 AM
Hi i am also having insufficient evidence.
means while i am debuging to find null pointer exception my compiler is stoping on return statement of navigation movement method (return super.navigationMovement(dx, dy, status, time);) so even i am also confused how to find the issue.
01-21-2013 07:54 AM
01-22-2013 01:53 AM
i am using break point exception in that only it is stoping on return super.navigationMovement(dx, dy, status, time);
position which is in navigationmovement method.
and it is displaying detailMessage=null in exception popup.