Note that I am using dojo's pattern for "subclassing"
dojox.gfx.Moveable, and overriding the methods onFirstMove, onMoving,
and onMoved. In each of these, there is a call to the relevant method
from NativeCustomMoveableCallback.java (which is a Java interface, by
the way). The GWT compiler is okay with the onFirstMove
implementation, but for both the onMoving and onMoved implementations,
I get the following error...
"Expected a valid parameter type signature in JSNI method reference"
Note that I have indicated that "shift" is an instance of a
NativeTransformDefinition, which is a subclass of JavaScriptObject in
my library. Isn't this valid? I thought that the GWT compiler
"trusts" the developer to indicate types of objects that come from
JavaScript, so long as the types are subclasses of JavaScriptObject.
So is it just that my syntax is somehow incorrect? I'm using GWT
1.7. If not, how can I refactor this to achieve a pattern which is
acceptable to the GWT compiler?
> Note that I am using dojo's pattern for "subclassing"
> dojox.gfx.Moveable, and overriding the methods onFirstMove, onMoving,
> and onMoved. In each of these, there is a call to the relevant method
> from NativeCustomMoveableCallback.java (which is a Java interface, by
> the way). The GWT compiler is okay with the onFirstMove
> implementation, but for both the onMoving and onMoved implementations,
> I get the following error...
> "Expected a valid parameter type signature in JSNI method reference"
> Note that I have indicated that "shift" is an instance of a
> NativeTransformDefinition, which is a subclass of JavaScriptObject in
> my library. Isn't this valid? I thought that the GWT compiler
> "trusts" the developer to indicate types of objects that come from
> JavaScript, so long as the types are subclasses of JavaScriptObject.
> So is it just that my syntax is somehow incorrect? I'm using GWT
> 1.7. If not, how can I refactor this to achieve a pattern which is
> acceptable to the GWT compiler?
Still looking for an answer on this one... I am puzzled as to how to
do this!
By the way, I realized during some other debugging that this bit of
code is one of many places where I was forgetting to state the "$wnd"
namespace. So here is the latest version of the problematic code...
> > Note that I am using dojo's pattern for "subclassing"
> > dojox.gfx.Moveable, and overriding the methods onFirstMove, onMoving,
> > and onMoved. In each of these, there is a call to the relevant method
> > from NativeCustomMoveableCallback.java (which is a Java interface, by
> > the way). The GWT compiler is okay with the onFirstMove
> > implementation, but for both the onMoving and onMoved implementations,
> > I get the following error...
> > "Expected a valid parameter type signature in JSNI method reference"
> > Note that I have indicated that "shift" is an instance of a
> > NativeTransformDefinition, which is a subclass of JavaScriptObject in
> > my library. Isn't this valid? I thought that the GWT compiler
> > "trusts" the developer to indicate types of objects that come from
> > JavaScript, so long as the types are subclasses of JavaScriptObject.
> > So is it just that my syntax is somehow incorrect? I'm using GWT
> > 1.7. If not, how can I refactor this to achieve a pattern which is
> > acceptable to the GWT compiler?
Please ignore the change in class and package names in this code,
compared to the previous posts. I realize that there were other
errors there, but that's not what this is about. The GWT compiler
didn't like how I was putting the type declarations on their own
lines.
Sorry for the confusion... but I suppose this is still a useful
post, since I discovered how much whitespace matters here.
Cheers,
Mike
On Nov 23, 6:02 pm, MonkeyMike <mikebin...@gmail.com> wrote:
> Still looking for an answer on this one... I am puzzled as to how to
> do this!
> By the way, I realized during some other debugging that this bit of
> code is one of many places where I was forgetting to state the "$wnd"
> namespace. So here is the latest version of the problematic code...
> > > Note that I am using dojo's pattern for "subclassing"
> > > dojox.gfx.Moveable, and overriding the methods onFirstMove, onMoving,
> > > and onMoved. In each of these, there is a call to the relevant method
> > > from NativeCustomMoveableCallback.java (which is a Java interface, by
> > > the way). The GWT compiler is okay with the onFirstMove
> > > implementation, but for both the onMoving and onMoved implementations,
> > > I get the following error...
> > > "Expected a valid parameter type signature in JSNI method reference"
> > > Note that I have indicated that "shift" is an instance of a
> > > NativeTransformDefinition, which is a subclass of JavaScriptObject in
> > > my library. Isn't this valid? I thought that the GWT compiler
> > > "trusts" the developer to indicate types of objects that come from
> > > JavaScript, so long as the types are subclasses of JavaScriptObject.
> > > So is it just that my syntax is somehow incorrect? I'm using GWT
> > > 1.7. If not, how can I refactor this to achieve a pattern which is
> > > acceptable to the GWT compiler?