My prototype seems to work fine using the simplest logic of invoking enum.valueOf(string.toUpperCase(Locale.English)) via reflection.
So far my tests have been limited to org.apache.pivot.wtk.Orientation & org.apache.pivot.wtk.ScrollPane$ScrollBarPolicy, but I will rip out all of the setEnum(String value) methods for the 39 public Pivot enums i found, do some more complete testing and will report back tomorrow. Regards, Chris On 8 September 2010 19:22, Greg Brown <[email protected]> wrote: > Oh, sorry - I was talking to you. :-) > > Sure, you can add it to JIRA first, or you could prototype it (to make sure > the premise is sound) and then add it to JIRA. Up to you. > > On Sep 8, 2010, at 8:14 AM, Chris Bartlett wrote: > > > Greg, > > > > Who were you referring to in your reply? > > Probably best to get it into JIRA.first, but I don't mind taking a look > > unless someone is itching to get stuck in to it. (Noel?) > > > > Chris > > > > On 7 September 2010 23:55, Greg Brown <[email protected]> wrote: > > > >> OK, great. Want to take a stab at adding this capability to > >> BeanAdapter.coerce()? > >> > >> On Sep 7, 2010, at 11:36 AM, Chris Bartlett wrote: > >> > >>> Ahh, I think I have finally pieced it all together! Apologies for > being > >> a > >>> bit slow ;) > >>> That all sounds reasonable to me, especially given the other > conventions > >>> used by BeanAdapter that you stated in the original email. > >> > >> > >
