pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammed AMHEND <amu...@gmail.com>
Subject CalendarButton Bug
Date Sun, 15 May 2011 09:26:43 GMT
Hi,
When I try to add to my project a CalendarButton it gives an error as follow
:

An error occurred at line number 27 in file
/C:/Users/Mohammed/BC/tests/bin/cours/calendar_test.bxml:
java.lang.IndexOutOfBoundsException: index -1 out of bounds.
    at
org.apache.pivot.collections.ArrayList.verifyIndexBounds(ArrayList.java:577)
    at org.apache.pivot.collections.ArrayList.get(ArrayList.java:346)
    at org.apache.pivot.wtk.TablePane$Row.get(TablePane.java:263)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.updateSelection(TerraCalendarSkin.java:706)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.selectedDateChanged(TerraCalendarSkin.java:963)
    at
org.apache.pivot.wtk.Calendar$CalendarSelectionListenerList.selectedDateChanged(Calendar.java:90)
    at org.apache.pivot.wtk.Calendar.setSelectedDate(Calendar.java:212)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin$4.selectionChanged(TerraCalendarSkin.java:506)
    at
org.apache.pivot.wtk.ButtonGroup$ButtonGroupListenerList.selectionChanged(ButtonGroup.java:46)
    at org.apache.pivot.wtk.ButtonGroup.setSelection(ButtonGroup.java:128)
    at org.apache.pivot.wtk.Button.setState(Button.java:469)
    at org.apache.pivot.wtk.Button.setSelected(Button.java:432)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.updateSelection(TerraCalendarSkin.java:707)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.selectedDateChanged(TerraCalendarSkin.java:963)
    at
org.apache.pivot.wtk.Calendar$CalendarSelectionListenerList.selectedDateChanged(Calendar.java:90)
    at org.apache.pivot.wtk.Calendar.setSelectedDate(Calendar.java:212)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin$4.selectionChanged(TerraCalendarSkin.java:506)
    at
org.apache.pivot.wtk.ButtonGroup$ButtonGroupListenerList.selectionChanged(ButtonGroup.java:46)
    at org.apache.pivot.wtk.ButtonGroup.setSelection(ButtonGroup.java:128)
    at org.apache.pivot.wtk.Button.setState(Button.java:469)
    at org.apache.pivot.wtk.Button.setSelected(Button.java:432)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.updateSelection(TerraCalendarSkin.java:707)
    at
org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.selectedDateChanged(TerraCalendarSkin.java:963)
    at
org.apache.pivot.wtk.Calendar$CalendarSelectionListenerList.selectedDateChanged(Calendar.java:90)
    at org.apache.pivot.wtk.Calendar.setSelectedDate(Calendar.java:212)
    at
org.apache.pivot.wtk.skin.CalendarButtonSkin.selectedDateChanged(CalendarButtonSkin.java:353)
    at
org.apache.pivot.wtk.CalendarButton$CalendarButtonSelectionListenerList.selectedDateChanged(CalendarButton.java:75)
    at
org.apache.pivot.wtk.CalendarButton.setSelectedDate(CalendarButton.java:243)
    at org.apache.pivot.wtk.CalendarButton.<init>(CalendarButton.java:155)
    at org.apache.pivot.wtk.CalendarButton.<init>(CalendarButton.java:145)
    at org.apache.pivot.wtk.CalendarButton.<init>(CalendarButton.java:141)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at
org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1544)
    at
org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:755)
    at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
    at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:614)
    at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:568)
    at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:534)
    at cours.CalendarTest.startup(CalendarTest.java:29)
    at
org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
    at
org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1474)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)


code :

<?xml version="1.0" encoding="UTF-8"?>

<Window title="Calendar Test" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns="org.apache.pivot.wtk">
....
    <BoxPane>
        <CalendarButton bxml:id="calendarButton"/> <!--line 27 -->
        <ListButton listData="['One', 'Two', 'Three']"/>
    </BoxPane>
</Window>


But, When I changed the current date to January 2010 it works good !

I'm confused, please help me !

Mime
View raw message