pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Vilar" <alejandro.vi...@synacom.com.bo>
Subject Exception in CalendarButton constructor
Date Sun, 01 Aug 2010 19:27:09 GMT
Hi all,

                I was editing the current date on my PC to perform some
tests related to my project and I have a problem with CalendarButtons, on
1st august 2010 there is a ArrayIndexOutOfBoundsException thrown in the
constructor(without args). Checking the code I found the cause on this


Class: org.apache.pivot.wtk.skin.terra.TerraCalendarSkin

Method: updateSelection(CalendarDate)

Line: 680


// Update the button group

int cellIndex = getCellIndex(year, month, day, calendar.getLocale()); //<--
cellIndex: -1

int rowIndex = cellIndex / 7;

int columnIndex = cellIndex % 7; //<-- columnIndex: -1


TablePane.Row row = calendarTablePane.getRows().get(rowIndex + 2);

DateButton dateButton = (DateButton)row.get(columnIndex); //<-- Exception




I don't know if the problem is only in my environment due I was changing
dates but it is clear that a negative index is calculated for some reason,
the attached image shows the calendar one day after (August 2) and as you
can see the 1st august doesn't exists. Does someone had this problem before?


Checked in pivot 1.4 and 1.5





View raw message