I mean (&& was added): static native boolean hasAttributes(JavaScriptObject jsObject) /*-{ return jsObject.attributes.length != null && jsObject.attributes.length != 0; }-*/;
-- Kind regards, Ignat Alexeyenko On Tue, Mar 23, 2010 at 8:46 PM, Ignat Alexeyenko <ignatalexeye...@gmail.com > wrote: > Hi! > > I have an error in GWT XML parser (GWT 1.7.1) > > Look at the following piece of code (XMLParserImpl.java:line182): > > static native boolean hasAttributes(JavaScriptObject jsObject) /*-{ > return jsObject.attributes.length != 0; > }-*/; > > In Firefox I've got a following exception when calling node.hasAttributes() > method: > node.jsObject.attributes is null > > Does anyone meet the following exception? > > It looks like I need to write a native method and use it instead of GWT's > hasAttributes() one. > The method should work like that: > > static native boolean hasAttributes(JavaScriptObject jsObject) /*-{ > return jsObject.attributes.length != null jsObject.attributes.length != > 0; > }-*/; > > Any other ideas? > Thank you. > > -- > Kind regards, > Ignat Alexeyenko. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.