Skip to Content
0
Former Member
Jun 29, 2007 at 05:51 AM

DropDownByIndex causes crash if empty slot selected

11 Views

I hope somebody could give me some advice.

I have a dropdown by index in my WD app which has an action bound to it. This action gets the current selection as a string. If the user happens to select the empty slot which the dropdown has by default at the top, the app crashes and displays a NullPointerException. No help if I try to validate whether the string var is null or try to calculate the length or anything. Every time the app tries to get the current selection (when the empty slot is selected) and put it in to a variable or perform some other operation on it, it crashes.

How to circumvent this?

Regards,

Erno