I am using SmartGWT 3.1 with GWT 2.4.
Browser : IE8
I have created a simple app to use smartGWT's Drawing API to show a lot of images on the page. Can I have any number of DrawPanes on a page? If I have about 30 DrawPanes on the page, I am getting "Invalid argument." error. For fewer DrawPanes, there was no issue though.
I looked at the js code in ISC_Drawing.js. When the DrawPane is created, the code is calling document.createStyleSheet() but there seems to be a limitation for IE.... Can't create more than 31 stylesheet objects with createStyleSheet method.
Could you let me know how I can get this working.
STACK TRACE:
===========
15:52:55.278 [ERROR] [zoomandpantest] 15:52:55.263:WARN:Log:Error: 'Invalid argument.' in http://127.0.0.1:8888/zoomandpantest/sc/modules/ISC_Drawing.js at line 14
DrawPane.initWidget(Obj{ID:isc_DrawPane_28}, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef) Canvas.init(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) [a]MathFunction.completeCreation(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) [c]Class.create(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) B() anonymous()
Browser : IE8
I have created a simple app to use smartGWT's Drawing API to show a lot of images on the page. Can I have any number of DrawPanes on a page? If I have about 30 DrawPanes on the page, I am getting "Invalid argument." error. For fewer DrawPanes, there was no issue though.
I looked at the js code in ISC_Drawing.js. When the DrawPane is created, the code is calling document.createStyleSheet() but there seems to be a limitation for IE.... Can't create more than 31 stylesheet objects with createStyleSheet method.
Could you let me know how I can get this working.
Code:
public void onModuleLoad() { VLayout layout = new VLayout(); layout.setWidth100(); layout.setAutoHeight(); for(int i=0; i<30; i++) { DrawPane drawPane = new DrawPane(); drawPane.setHeight(200); drawPane.setWidth(200); drawPane.setLeft(25); drawPane.setShowEdges(true); drawPane.setEdgeSize(4); drawPane.setOverflow(Overflow.HIDDEN); drawPane.setCursor(Cursor.AUTO); drawPane.addDrawHandler(new DrawHandler() { @Override public void onDraw(DrawEvent event) { DrawPane drawPane = (DrawPane) event.getSource(); DrawTriangle drawTriangle = new DrawTriangle(); drawTriangle.setDrawPane(drawPane); drawTriangle.setPoints(new Point(100,50),new Point(150,150),new Point(50,150)); drawTriangle.draw(); } }); layout.addMember(drawPane); } layout.draw(); }
===========
15:52:55.278 [ERROR] [zoomandpantest] 15:52:55.263:WARN:Log:Error: 'Invalid argument.' in http://127.0.0.1:8888/zoomandpantest/sc/modules/ISC_Drawing.js at line 14
DrawPane.initWidget(Obj{ID:isc_DrawPane_28}, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef) Canvas.init(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) [a]MathFunction.completeCreation(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) [c]Class.create(_1=>Obj{ID:isc_DrawPane_28}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) B() anonymous()