@John T: Are you saying we wouldn't want those methods on JsArray classes,
though? Seems like that's an appropriate place to put them. People don't
usually subclass containers like that (do they?).

On Tue, Feb 2, 2010 at 2:50 PM, Tom Schindl <[email protected]> wrote:

> On Tue, Feb 2, 2010 at 8:19 PM, John Tamplin <[email protected]> wrote:
> > On Tue, Feb 2, 2010 at 2:16 PM, Tom <[email protected]> wrote:
> >>
> >> I have some questions and proposals around the JsArray-classes because
> >> they are handy when working with JSNI but I believe they could be
> >> improved a bit.
> >>
> >> a) Why are not all native methods provided through the wrapper.
> >
> > One problem is that given how JSOs work, using a name on a parent class
> > means no subclass can have a method of that name.  Thus, you want to be
> very
> > careful about adding methods to a JSO class that is intended to be
> > subclassed.
> > A reasonable option would be to add a final subclass which does have
> those
> > methods, and you can freely cast any JSO to that class when you need to
> use
> > those methods.
>
> Thanks for your response. You are right. I didn't thought about the
> fact that someone could have already subclassed this base
> implementation and would be broken with such a changes.
>
> Anyways I'd volunteer to implement the needed classes if you decide
> that this is a good idea.
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to