Wow, I never thought of doing something crazy like that. Is there any
code actually doing this? This seems potenntially unsafe even if
different compilers generated the same suffix, I wouldn't trust it to
work after refactoring, I'd think even a code reformat operation in
the IDE has the potential to break it if it moves declarations around.

-Ray

On Wed, Feb 11, 2009 at 12:22 PM, John Tamplin <j...@google.com> wrote:
> On Wed, Feb 11, 2009 at 3:02 PM, Ray Cromwell <cromwell...@gmail.com> wrote:
>>
>> Just out of curiousity, how does one reference an anonymous inner
>> class from JSNI (or do you mean Local classes?) Since it has no
>> concrete type name, the only thing I can think of referencing it via a
>> superclass/superinterface type, but surely you can't be talking about
>> deprecating that.
>>
>> e.g.
>>
>> public native void someJSNI(ClickListener foo) /*-{
>>   f...@x.y.clicklistener::onClick()();
>> }-*/;
>>
>> Does this then count as an anonymous inner class reference?
>> someJSNI(new ClickListener() { public void onClick() { } });
>
> Currently you can reference it by the binary name, ie
> f...@foo$1::onClick()().  The problem is the $1 part can be different
> between different compilers, and right now we have to make them all look
> like JDT for compatibility.
>
> --
> John A. Tamplin
> Software Engineer (GWT), Google
>
> >
>

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

Reply via email to