01-21-2013 06:51 AM
Hi all
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.
Thanks.
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
Hi peter
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.
Thanks
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.
thanks
01-21-2013 07:54 AM
01-22-2013 01:53 AM
hi simon
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.
01-22-2013 04:04 AM
I think you are going to have to recreate the problem with some simple classes that you can paste here so we can have a look at all your code and try it.