Closed GoogleCodeExporter closed 9 years ago
I can see the problem in the code, but I can't actually reproduce it by
creating a
preference method that returns 'int'.
Original comment by galgwt.reviews@gmail.com
on 14 Nov 2008 at 12:39
I had this problem when for my mistake I created an interface like this.
interface MyGadgetPreferences extends UserPreferences {
StringPreference method1();
// The wrong method
void setPrefId();
}
Yes offcourse this class was wrong, but the UserPreferencesConverter didn't
says to
me a correct message. The message was a NPE...that for me is wrong.
Original comment by daniele.galdi@gmail.com
on 14 Nov 2008 at 1:28
Original comment by galgwt.reviews@gmail.com
on 11 Dec 2008 at 9:23
public interface HelloPreferences extends UserPreferences {
@PreferenceAttributes(display_name = "Barley", //
default_value = "Hops", //
options = Options.REQUIRED)
StringPreference goodBrew();
@PreferenceAttributes(display_name = "Bob", //
default_value = "Doug", //
options = Options.REQUIRED)
void strangeBrew();
}
gives me the error:
Compiling module com.google.gwt.gadgets.sample.hellogadgets.HelloGadgets
Computing all possible rebind results for
'com.google.gwt.gadgets.sample.hellogadgets.client.HelloGadgets'
Rebinding com.google.gwt.gadgets.sample.hellogadgets.client.HelloGadgets
Invoking <generate-with class='com.google.gwt.gadgets.rebind.GadgetGenerator'/>
Building gadget manifest
Generating userpref element for method public abstract void strangeBrew()
[ERROR] void is not assignable to
com.google.gwt.gadgets.client.UserPreferences.Preference
[ERROR] Build failed
which looks reasonable. I'm using gwt-gadgets 1.0.1(plus a few unreleased
patches) +
gwt 1.5.3
I'll go on and add protection around preference type anyway.
Original comment by galgwt.reviews@gmail.com
on 8 Jan 2009 at 5:04
http://galgwt-reviews.appspot.com/2403
Original comment by galgwt.reviews@gmail.com
on 8 Jan 2009 at 6:08
Committed as r1163.
Original comment by galgwt.reviews@gmail.com
on 9 Jan 2009 at 6:26
Original comment by galgwt.reviews@gmail.com
on 9 Jan 2009 at 6:26
Released in gwt-gadgets-1.0.2
Original comment by galgwt.reviews@gmail.com
on 21 Feb 2009 at 1:29
Updating account names
Original comment by zundel@google.com
on 21 Dec 2009 at 2:00
Original issue reported on code.google.com by
daniele.galdi@gmail.com
on 14 Nov 2008 at 11:32Attachments: