If I want my GWT2.6.1 application to compile to ie10, this is correct isn't it;
<set-property name="user.agent" value="ie8,ie9,opera,gecko1_8,safari,ie10" />
?
Because my app is producing this bizarre error in ie10;
SEVERE: Exception caught: (TypeError)
description: Object doesn't support property or method 'replace'
stack: TypeError: Object doesn't support property or method 'replace'
__gwt$exception: <skipped>: Object doesn't support property or method 'replace'com.google.gwt.user.client.ui.AttachDetachException: Exception caught: (TypeError)
description: Object doesn't support property or method 'replace'
Note the "trim()" - which I was astonished to learn recently wasn't supported on ie8.
Is this just a coincidence and the error lies elsewhere? or is somehow a ie8 permutation running in ie10?
Can anything else override what permutation is picked to run?
The application works fine on chrome, firefox and opera.
The problem is a bit more curious, however, as some trim statements do work.
Heres the code triggering the crash:
SOLog.info("~~~~~Just before trimming");
SOLog.info(""+GWT.getHostPageBaseURL().trim()); //displays the homepage url fine
Element ParentElement = this.getElement().getParentElement();
SOLog.info("Got parent E"); //displays
Style ElementStyle = ParentElement.getStyle();
SOLog.info("Got parent Style"); //displays
String ZindexNonTrim = ElementStyle.getZIndex();
SOLog.info("Got parent Zindex "+ZindexNonTrim); //reachs here fine. The zindex of the element happens to be 30 and that value displays in the log correctly
SOLog.info(""+ZindexNonTrim.getClass().getName()); //this results in "java.lang.string"
String blar = "30".trim(); //this trim works
SOLog.info("Well gosh darnit! "+blar);
String zindexstring = ZindexNonTrim.trim(); //this one causes the crash <<<<<<<<<<<<<<
SOLog.info("~~~~~zomg no crashyness?");
I just cant get my head around why a string.trim() is causing a crash when other string.trims() are not.
HELP!
;(
Appreciate anything,
Thomas Wrobel