If you get IndexOutOfBoundsException during retrieving of ToDo.DUE property value, check before it has a value.
Wrong :
lngEnd = _SourceContext.getDate(BlackBerryToDo.DUE, 0);
Correct :
ToDo (Task) ile ilgili uygulama geliştirirken ToDo.DUE bilgisini almanız gerekirse eğer, direkt olarak getDate(ToDo.DUE, 0) ile koda başlamayın. Çünkü bu durum IndexOutOfBoundsException hatası oluşturuyor. Bu exception ın çıkma sebebi de ToDo da Due : None seçilmiş olması. Eğer By Date seçilir ve bir tarih belirtlenirse IndexOutOfBoundsException hatası alınmıyor.
Dolayısı ile kodumuzu aşağıdaki hatalı / doğru durumunu göz önüne alarak yazmakta fayda var. Due : None seçili iken alanda değer olmuyor, Due : By Date seçili iken değer oluyor.
Hatalı :
lngEnd = _SourceContext.getDate(BlackBerryToDo.DUE, 0);
Doğru :