I am extending the DatePickerComponent  directly, as the MonthSelector
isn't very usable.
I have added the implementation for setAllowableDateRange() as I only
want people to be able to select years.
I am extending the SimpleMonthSelector:
        public class MyMonthSelector extends SimpleMonthSelector {

The same error occurs when I extend the MonthSelector. Please verify
this?

I do get this error:
[ERROR] Uncaught exception escaped
java.lang.IllegalAccessError: tried to access class
com.google.gwt.widgetideas.datepicker.client.DatePickerComponent from
class com.google.gwt.demos.datepicker.client.DatePickerDemo
$MyMonthSelector
        at com.google.gwt.demos.datepicker.client.DatePickerDemo
$MyMonthSelector.access$0(DatePickerDemo.java:1)
        at com.google.gwt.demos.datepicker.client.DatePickerDemo
$MyMonthSelector$2.onClick(DatePickerDemo.java:404)
        at
com.google.gwt.user.client.ui.ClickListenerCollection.fireClick(ClickListenerCollection.java:
34)


I think in general the DatePicker should be made more usable. Here are
a few things I don't understand:
- I am not allowed to use the DatePicker.Styles class. Why not ? As I
want to use it in my own selector just like happens in the
SimpleMonthSelector.
- The SimpleMonthSelector isn't usable. The method should be splitup
in smaller protected methods such that this functionality can be used
and the subclass can compose his own functionality. I am case I need
to only change the listeners but those are set in the setup, such that
I need to override the whole setup, but I need the other functionality
in setup for the buttons and stuff and the styles, especially as this
latter one is needed as I can't access the Style class (previous
point).
- Why do I need to subclass DatePicker to use my own MonthSelector?...
Why is this DatePicker constructor protected and not public ?

I am thinking about copying the whole DatePicker to my own space as I
can't use it like this :(... but I do want to use it...


-- Ed






On Sep 25, 12:44 am, "Emily Crutcher" <[EMAIL PROTECTED]> wrote:
> Are you extending MonthSelector or DatePickerComponent?  MonthSelector is
> public, so if you are extending that, could you create an issue, as that
> should darn well work, though you will have to create a new subclass of
> DatePicker to use your new month selector as well.
>
> On Wed, Sep 24, 2008 at 6:00 PM, Ed <[EMAIL PROTECTED]> wrote:
>
> > Why is the class DatePickerComponent of the DatePicker protected ? I
> > want to add my own MonthSelector, but when I do this, it throws an
> > access exception because this class it protected :(
>
> --
> "There are only 10 types of people in the world: Those who understand
> binary, and those who don't"
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to