Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    WARN (warnings) on console when I migrated from smartgwt 2.0 to 2.1

    Hi,

    Today I tried to migrate from smartgwt 2.0 to smartgwt 2.1 version (the new one). Unfortunately, I get warnings on my console for almost each view - e.g. 350.6 cannot be rounded to float and others.

    I didn't get this problem with 2.0 version. I just turned to 2.1.

    Do you have the same problem on console?
    Should I be worried about this?

    PS: I use GWT-dev 2.0.0

    Thanks for your reply:)
    Krisw

    #2
    same with me.

    some of the warnings i am getting are:

    WARN:VLayout:isc_OID_23:Adding already drawn widget:isc_OID_19_groupLabel to new parent:isc_OID_23. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.

    MUP3:WARN:drawing:isc_OID_148:draw() called on widget with current drawn state: complete, use redraw() instead. Canvas.readyToDraw() ListGrid.draw(_1=>undef, _2=>undef, _3=>undef, _4=>undef) anonymous() anonymous()

    RDQ0:WARN:ResultSet:isc_ResultSet_4 (created by: isc_OID_153):get: invalid index -1


    Hard to interpret some of these. should we just ignore the warnings? How will it affect further development?

    thanks

    Comment


      #3
      You were always getting these warnings in the Developer Console. Now they are reported more prominently.

      This one:

      MUP3:WARN:drawing:isc_OID_148:draw() called on widget with current drawn state: complete, use redraw() instead. Canvas.readyToDraw() ListGrid.draw(_1=>undef, _2=>undef, _3=>undef, _4=>undef) anonymous() anonymous()
      .. is an error where you are calling draw() unnecessarily.

      This one:
      .. 350.6 cannot be rounded to float and others.
      May indicate that you are passing fractions as coordinates or sizes.

      The other two may or may not indicate usage errors, you could try to isolate them to figure it out.

      Comment


        #4
        Help me! I still get that error even when not call any draw() function :(

        Comment


          #5
          Originally posted by Isomorphic
          .. is an error where you are calling draw() unnecessarily.
          Same as above poster. I'm not calling any .draw()s. My error is in reference to a ToolStripButton:
          16:10:29.934:TMR7:WARN:drawing:isc_ToolStripButton_2_label:draw() called on widget with current drawn state: complete, use redraw() instead.
          The button is initialised and has cmdLoading.setVisibility(Visibility.HIDDEN) set. When its time I call cmdLoading.show() or cmdLoading.setVisible(true), either of which I've isolated to be the cause of the error on the first invocation.

          (SmartGWT 2.2 LGPG)

          Comment


            #6
            same situation and warning here, SmartClient_SC_SNAPSHOT-2010-08-25_LGPL, IE6/Chrome

            Comment


              #7
              Originally posted by sunnyl
              Same as above poster. I'm not calling any .draw()s. My error is in reference to a ToolStripButton:


              The button is initialised and has cmdLoading.setVisibility(Visibility.HIDDEN) set. When its time I call cmdLoading.show() or cmdLoading.setVisible(true), either of which I've isolated to be the cause of the error on the first invocation.

              (SmartGWT 2.2 LGPG)
              the same problem, any ideas?

              Comment


                #8
                Looks like no one from this thread has read the FAQ :)

                If you think you've got a bug, put together a standalone test case demonstrating the problem. In the process, you will likely discover a usage error.

                Comment


                  #9
                  I don't know if it's a bug, maybe this warning is right and I'm doing something wrong...anyway:

                  SC_SNAPSHOT-2010-08-30/LGPL
                  IE6/Chrome/FF

                  developer console:
                  09:40:51.687:MUP3[E]:WARN:drawing:hiddenButton_label: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, undef, undef)
                  StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
                  Canvas.predrawPeers()
                  ** recursed on Canvas.draw

                  code (cut'n'paste in /SmartClient_Explorer.html#buttonAppearance):
                  Code:
                  isc.HStack.create({
                  members: [
                  isc.IButton.create({
                      ID: "hiddenButton",
                      title: "Hidden Button",
                      width: 200,
                      visibility: "hidden"
                  }),
                  
                  isc.IButton.create({
                      width: 200,
                      title: "Show Button",
                      click: "hiddenButton.show()"
                  })
                  ]});

                  Comment


                    #10
                    Run test cases outsid of the Feature Explorer, it's a special environment.

                    Your problem is incorrect settings for autoDraw and there's a message in your Developer Console telling you so.

                    Comment


                      #11
                      this is the test case outside of the feature explorer:

                      Code:
                      				isc.setAutoDraw(false);
                      				isc.HStack.create({
                      					width: "100%", height: "100%",
                      					members: [
                      						isc.IButton.create({
                      						    ID: "hiddenButton",
                      						    title: "Hidden Button",
                      						    width: 200,
                      						    visibility: "hidden"
                      						}),
                      		
                      						isc.IButton.create({
                      						    width: 200,
                      						    title: "Show Button",
                      						    click: "hiddenButton.show()"
                      						})
                      				]}).draw();
                      complete dev console:
                      11:22:27.953:INFO:Log:initialized
                      11:22:27.968:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined. Returning 500
                      11:22:27.968:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was written out -- value cannot be determined. Returning 500
                      11:22:28.281:WARN:AutoObserver:Use addInterfaceProperties() to add methods to interface [Class AutoObserver]
                      11:22:28.843:INFO:Log:isc.Page is loaded
                      11:22:34.937:MUP0[E]:WARN:drawing:hiddenButton_label: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, undef, undef)
                      StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
                      Canvas.predrawPeers()
                      ** recursed on Canvas.draw

                      I don't understand what's wrong with my autoDraw setting... :-|

                      Comment


                        #12
                        Not reproducible.

                        Comment


                          #13
                          Very strange, because I got the warning even on a machine different from mine (which is win XP), a machine with Kubuntu Lucid, with a fresh install of everything from Eclipse to SmartClient.

                          I've got a even simpler test, here is the complete html (SmartClient_SC_SNAPSHOT-2010-09-05_LGPL):

                          Code:
                          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                          <html>
                          <head>
                          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                          <title>Insert title here</title>
                          <SCRIPT>var isomorphicDir="./isomorphic/";</SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_Core.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_Containers.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_Grids.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_Forms.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
                          <SCRIPT SRC=./isomorphic/skins/Enterprise/load_skin.js></SCRIPT>
                          </head>
                          <body>
                          <div>
                          	<script type="text/javascript">
                          				isc.HStack.create({
                          					width: "100%", height: "100%",
                          					members: [
                          						isc.IButton.create({
                          						    ID: "testButton",
                          						    autoDraw: false,
                          						    title: "Test Button",
                          						    width: 200,
                          						    visibility: "hidden"
                          						})
                          				]});
                          				
                          				testButton.show();		
                          	</script>
                          </div>
                          </body>
                          </html>
                          There something wrong with autoDraw ?

                          Don't you get this warning ?
                          Code:
                          11:56:48.850:INFO:Log:initialized
                          11:56:48.995:WARN:AutoObserver:Use addInterfaceProperties() to add methods to interface [Class AutoObserver]
                          11:56:49.319:KDN0[E]:WARN:drawing:testButton_label: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, undef, undef)
                              StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
                              Canvas.predrawPeers()
                              ** recursed on Canvas.draw
                          
                          11:56:49.357:INFO:Log:isc.Page is loaded
                          someone else on this forum gets the same warning?

                          Comment


                            #14
                            I get the same warning when I call show() on an "IButton", which was previously hidden with a hide() call. I don't get the warning if I use "Button" instead of "IButton".

                            Code:
                            button = new IButton("My Button");
                            button.setWidth(120);
                            button.setAlign(Alignment.CENTER);
                            someHLayout.addMember(button);
                            I understand that show() is calling draw() also. Instead of using show(), I tried using setVisibility(Visibility.INHERIT) / setVisibility(Visibility.VISIBLE), but got the same warning.

                            So, what's the right way to show / hide buttons (IButton) repeatedly based on the state of the application?

                            Thanks.
                            Last edited by deepfriedbrain; 7 Nov 2010, 04:47.

                            Comment


                              #15
                              Hi,

                              I've written a standalone test case that demonstrates this problem in smartgwt 2.4 in Firefox 4.0.1 and Google Chrome 11.0.696.57 in Ubuntu 10.04.

                              The following is a class that causes these warnings:
                              Code:
                              public class ToolStripBarTabs implements EntryPoint {
                              	
                              	public void onModuleLoad() {
                              		ToolStrip toolstrip = new ToolStrip();
                              		final ToolStripButton first = new ToolStripButton("first");
                              		final ToolStripButton second = new ToolStripButton("second");
                              		toolstrip.addButton(first);
                              		toolstrip.addButton(second);
                              		second.hide();
                              		
                              		TabSet tabs = new TabSet();
                              		Tab firstTab = new Tab("first tab");
                              		firstTab.setPane(new VLayout());
                              		Tab secondTab = new Tab("second tab");
                              		secondTab.setPane(new HLayout());
                              		tabs.addTab(firstTab);
                              		tabs.addTab(secondTab);
                              		
                              		tabs.addTabSelectedHandler(new TabSelectedHandler() {
                              			public void onTabSelected(TabSelectedEvent event) {
                              				Canvas pane = event.getTab().getPane();
                              				if(pane instanceof HLayout){
                              					// !!Warning happens here!!
                              					second.show();
                              				}
                              				else 
                              					second.hide();
                              			}
                              		});
                              		
                              		VLayout mainLayout = new VLayout();
                              		mainLayout.addMember(toolstrip);
                              		mainLayout.addMember(tabs);
                              		toolstrip.setWidth100();
                              		tabs.setWidth100();
                              		mainLayout.setWidth100();
                              		mainLayout.draw();
                              	}
                              }
                              The following is the output in the SmartClient Developer Console when 'second tab' is clicked:
                              Code:
                              11:35:37.909:MDN2[E]:WARN:drawing:isc_ToolStripButton_1_label: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, undef, undef)
                                  StatefulCanvas.draw(_1=>undef, _2=>undef, _3=>undef)
                                  Canvas.predrawPeers()
                                  ** recursed on Canvas.draw

                              Comment

                              Working...
                              X