SmartGWT 3.0p 2012-02-15
GWT 2.4
Firefox 3.6
Attempting to follow this example: http://www.smartclient.com/smartgwt/...layout_nesting
I tried to port this to a Window object with a few tweaks and I get the warning below. It does not seem to have an effect on the functionality (that is, the side panel still pops out and the interface can still be interacted with) but I don't know if I will start to see strange behavior later on.
The warning in the console:
This was reproducible in my environment with the following:
Seems to happen on the resizeTo() call in onDraw(). Should this warning be ignored?
GWT 2.4
Firefox 3.6
Attempting to follow this example: http://www.smartclient.com/smartgwt/...layout_nesting
I tried to port this to a Window object with a few tweaks and I get the warning below. It does not seem to have an effect on the functionality (that is, the side panel still pops out and the interface can still be interacted with) but I don't know if I will start to see strange behavior later on.
The warning in the console:
Code:
com.smartgwt.client.core.JsObject$SGWT_WARN: 12:03:54.006:MUP7[E]:WARN:drawing:isc_VLayout_1:draw() called on widget with current drawn state: complete, use redraw() instead. Class.getStackTrace(_1=>undef, _2=>undef, _3=>undef, _4=>undef) Canvas.readyToDraw() Canvas.draw(_1=>undef) Layout.layoutChildren(_1=>"resized", _2=>180, _3=>0) Canvas.$t1() Canvas.resizeBy(_1=>180, _2=>0, _3=>undef, _4=>undef) Canvas.resizeTo(_1=>269, _2=>73, _3=>undef, _4=>undef) Layout.resizeMembers(_1=>Array[1], _2=>Array[1], _3=>true) ** recursed on Layout.layoutChildren at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.smartgwt.client.widgets.Canvas.resizeTo(Canvas.java) at client.Client$SideLayoutVisibilityHandler.onDraw(Client.java:129) at com.smartgwt.client.widgets.events.DrawEvent.dispatch(DrawEvent.java:70) at com.smartgwt.client.widgets.events.DrawEvent.dispatch(DrawEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127) at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67) at com.smartgwt.client.widgets.BaseWidget.rendered(BaseWidget.java:245) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:662)
Code:
public void onModuleLoad() { final com.smartgwt.client.widgets.Window window = new com.smartgwt.client.widgets.Window(); window.setWidth(150); window.setHeight(100); HLayout windowLayout = new HLayout(); windowLayout.setWidth100(); windowLayout.setHeight100(); VLayout mainLayout = new VLayout(); mainLayout.setResizeBarTarget("next"); mainLayout.setShowResizeBar(true); // mainLayout.setWidth(window.getWidth() - window.getResizeBarSize()); mainLayout.setWidth(window.getWidth() - 16); mainLayout.setHeight100(); VLayout sideLayout = new VLayout(); sideLayout.setVisibility(Visibility.HIDDEN); SideLayoutVisibilityHandler handler = new SideLayoutVisibilityHandler(window, sideLayout); sideLayout.setWidth(180); sideLayout.setHeight100(); sideLayout.addDrawHandler(handler); sideLayout.addVisibilityChangedHandler(handler); windowLayout.setMembers(mainLayout, sideLayout); window.addItem(windowLayout); window.show(); } private class SideLayoutVisibilityHandler implements VisibilityChangedHandler, DrawHandler { private final com.smartgwt.client.widgets.Window window; private final Layout layout; public SideLayoutVisibilityHandler (com.smartgwt.client.widgets.Window window, Layout layout) { this.window = window; this.layout = layout; } @Override public void onVisibilityChanged(VisibilityChangedEvent event) { if (event.getIsVisible()) { window.resizeTo(window.getWidth() + layout.getWidth(), window.getHeight()); } else { window.resizeTo(window.getWidth() - layout.getWidth(), window.getHeight()); } } @Override public void onDraw(DrawEvent event) { window.resizeTo(window.getWidth() + layout.getWidth(), window.getHeight()); // line 129 } }
Comment