Announcement

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

    SmartGWT 4.1 issue with DrawPane

    Hi All,

    I downloaded SmartGWT new version(4.1) and using it in our project. I have a scenario where I have written a click handler for a DrawRect object. When I click on this DrawRect, I am asking for a confirmation message (SC.confirm). In the new version, I am getting the folowing error

    [ERROR] Uncaught exception escaped
    com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(8708), JavaScript object(8707), JavaScript object(8718)]): _1.getParentCanvas is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source) 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:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:619)

    Can you please suggest what could be the issue?

    Thanks in advance.

    #2
    Use the instructions in the FAQ to gather more useful information about the JavaScript error.

    Try putting together a test case that replicates the problem and we can take a look.

    Comment


      #3
      Hi,

      Thanks for the reply. Following is the debug stack trace of the javascript error when I click on a DrawRect object.

      16:11:06.923:KUP6:INFO:EventHandler:keyUp event with Canvas target: null, native target: [HTMLElement]{nodeName:HTML}
      16:11:07.311:TMR8:DEBUG:EventHandler:mousing over [GridBody ID:isc_DRSManagementUI_8_0_body]
      16:11:07.717:TMR5:DEBUG:GridBody:isc_DRSManagementUI_8_0_body:delaying adjustOverflow: cell height changed
      16:11:07.735:TMR9:INFO:sizing:isc_DRSManagementUI_8_0_body:Specified size: 1139x596, drawn scroll size: 1139x596, border: 0x0, margin: 0x0, reason: cell height changed
      16:11:07.736:TMR9:DEBUG:sizing:isc_DRSManagementUI_8_0_body:handle sizes: {scrollLeft: 0,
      scrollTop: 0,
      scrollWidth: 1139,
      scrollHeight: 596,
      clientWidth: undef,
      clientHeight: undef,
      offsetWidth: 1139,
      offsetHeight: 596,
      styleLeft: "0px",
      styleTop: "0px",
      styleWidth: "1139px",
      styleHeight: "596px",
      styleClip: ""}
      16:11:07.736:TMR9:INFO:scrolling:isc_DRSManagementUI_8_0_body:Drawn size: 1139 by 596, specified: 1139 by 596, scrollbar state:
      16:11:07.737:TMR0:DEBUG:EventHandler:mousing out of [GridBody ID:isc_DRSManagementUI_8_0_body] mousing over [DrawPane ID:isc_DrawPane_0]
      16:11:07.944:TMR6:DEBUG:EventHandler:mousing out of [DrawPane ID:isc_DrawPane_0] mousing over [DrawRect ID:isc_DrawRect_12]
      16:11:07.947:TMR6:WARN:Log:TypeError: _1.getParentCanvas is not a function
      Stack from error.stack:
      Canvas.contains() @ linkmanager/sc/modules/ISC_Core.js:1921
      GridRenderer.mouseOut() @ linkmanager/sc/modules/ISC_Grids.js:611
      Canvas.handleMouseOut() @ linkmanager/sc/modules/ISC_Core.js:2431
      [c]EventHandler.bubbleEvent() @ linkmanager/sc/modules/ISC_Core.js:1375
      [c]EventHandler.handleEvent() @ linkmanager/sc/modules/ISC_Core.js:1156
      EventHandler.._handleMouseMove() @ linkmanager/sc/modules/ISC_Core.js:1222
      EventHandler._handleMouseMove() @ linkmanager/sc/modules/ISC_Core.js:1211
      EventHandler._delayedMouseMove() @ linkmanager/sc/modules/ISC_Core.js:1211
      [c]Class.fireCallback() @ linkmanager/sc/modules/ISC_Core.js:279
      Timer._fireTimeout() @ linkmanager/sc/modules/ISC_Core.js:1129
      unnamed() @ linkmanager/sc/modules/ISC_Core.js:1125
      unnamed() @

      16:11:07.959:TMR9:DEBUG:EventHandler:mousing over [DrawRect ID:isc_DrawRect_12]
      16:11:08.004:TMR3:DEBUG:Messaging:keepalive on conn: isc_HiddenFrame_7
      16:11:08.909:MDN1:INFO:EventHandler:Target Canvas for event 'mousedown': [DrawPane ID:isc_DrawPane_0]
      16:11:08.911:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[DrawPane ID:isc_DrawPane_0]' has handler: DrawPane.prepareForDragging()
      16:11:08.914:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_3]' has handler: Canvas.prepareForDragging()
      16:11:08.916:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_DRSManagementUI_8_0_expansionLayout]' has handler: Canvas.prepareForDragging()
      16:11:08.916:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[GridBody ID:isc_DRSManagementUI_8_0_body]' has handler: Canvas.prepareForDragging()
      16:11:08.917:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[ListGrid ID:isc_DRSManagementUI_8_0]' has handler: Canvas.prepareForDragging()
      16:11:08.919:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_0]' has handler: Canvas.prepareForDragging()
      16:11:08.920:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_4]' has handler: Canvas.prepareForDragging()
      16:11:08.921:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[HLayout ID:isc_HLayout_4]' has handler: Canvas.prepareForDragging()
      16:11:08.923:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_2]' has handler: Canvas.prepareForDragging()
      16:11:08.924:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[HLayout ID:isc_HLayout_2]' has handler: Canvas.prepareForDragging()
      16:11:08.926:MDN1:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_1]' has handler: Canvas.prepareForDragging()
      16:11:08.927:MDN1:DEBUG:EventHandler:Event 'prepareForDragging' bubbled to top
      16:11:08.927:MDN1:DEBUG:dragDrop:No dragTarget, not dragging
      16:11:08.927:MDN1:DEBUG:EventHandler:Bubbling event 'mouseDown', target '[DrawRect ID:isc_DrawRect_12]' has handler: DrawItem.mouseDown()
      16:11:08.928:MDN1:DEBUG:EventHandler:Bubbling for event 'mouseDown' stopped by '[VLayout ID:isc_DRSManagementUI_8_0_expansionLayout]' which does not allow bubbling
      16:11:09.046:MUP2:INFO:EventHandler:Target Canvas for event 'mouseup': [DrawPane ID:isc_DrawPane_0]
      16:11:09.048:MUP2:DEBUG:EventHandler:Bubbling event 'mouseUp', target '[DrawRect ID:isc_DrawRect_12]' has handler: DrawItem.mouseUp()
      16:11:09.051:MUP2:DEBUG:EventHandler:Bubbling for event 'mouseUp' stopped by '[VLayout ID:isc_DRSManagementUI_8_0_expansionLayout]' which does not allow bubbling
      16:11:09.052:MUP2:DEBUG:EventHandler:Bubbling event 'click', target '[DrawRect ID:isc_DrawRect_12]' has handler: [o]DrawRect.click()
      16:11:09.069:MUP2:DEBUG:EventHandler:Bubbling for event 'click' stopped by '[VLayout ID:isc_DRSManagementUI_8_0_expansionLayout]' which does not allow bubbling
      16:11:09.098:click3:INFO:destroys:isc_IButton_0:destroy()
      Canvas.$75s(_1=>true, _2=>undef)
      Canvas.destroy(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
      [a]MathFunction.invokeSuper(_1=>null, _2=>"destroy", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
      [a]MathFunction.Super(_1=>"destroy", _2=>[object Arguments], _3=>undef)
      StatefulCanvas.destroy()
      Toolbar.setButtons(_1=>Array[2])
      Window.setToolbarButtons(_1=>Array[2])
      Window.setButtons(_1=>Array[2])
      [a]MathFunction.setProperties(Obj{title:Confirm})
      [a]Dialog.showMessage(_1=>"Switch to Alternate Source ?", _2=>Obj{title:Confirm})
      anonymous(_1=>"Switch to Alternate Source ?", _2=>"confirm", _3=>anonymous(), _4=>Obj{title:Confirm})
      anonymous(_1=>"Switch to Alternate Source ?", _2=>anonymous(), _3=>undef)
      anonymous(message=>"Switch to Alternate Source ?", callback=>de.dimetis.linkmanager.client.modules.drs.DRSManagementUI$18@1e76960)
      anonymous(thisObj=>com.google.gwt.http.client.RequestBuilder$1@1603076, dispId=>41025538, p0=>[object XMLHttpRequest])
      anonymous([object Event])
      anonymous(jsFunction=>anonymous(), thisObj=>[object XMLHttpRequest], args=>[object Arguments])
      anonymous(thisObj=>null, dispId=>65698, p0=>anonymous(), p1=>[object XMLHttpRequest], p2=>[object Arguments])
      anonymous([object Event])

      16:11:09.116:click3:INFO:destroys:isc_IButton_1:destroy()
      Canvas.$75s(_1=>true, _2=>undef)
      Canvas.destroy(_1=>undef, _2=>undef, _3=>undef, _4=>undef, _5=>undef)
      [a]MathFunction.invokeSuper(_1=>null, _2=>"destroy", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
      [a]MathFunction.Super(_1=>"destroy", _2=>[object Arguments], _3=>undef)
      StatefulCanvas.destroy()
      Toolbar.setButtons(_1=>Array[2])
      Window.setToolbarButtons(_1=>Array[2])
      Window.setButtons(_1=>Array[2])
      [a]MathFunction.setProperties(Obj{title:Confirm})
      [a]Dialog.showMessage(_1=>"Switch to Alternate Source ?", _2=>Obj{title:Confirm})
      anonymous(_1=>"Switch to Alternate Source ?", _2=>"confirm", _3=>anonymous(), _4=>Obj{title:Confirm})
      anonymous(_1=>"Switch to Alternate Source ?", _2=>anonymous(), _3=>undef)
      anonymous(message=>"Switch to Alternate Source ?", callback=>de.dimetis.linkmanager.client.modules.drs.DRSManagementUI$18@1e76960)
      anonymous(thisObj=>com.google.gwt.http.client.RequestBuilder$1@1603076, dispId=>41025538, p0=>[object XMLHttpRequest])
      anonymous([object Event])
      anonymous(jsFunction=>anonymous(), thisObj=>[object XMLHttpRequest], args=>[object Arguments])
      anonymous(thisObj=>null, dispId=>65698, p0=>anonymous(), p1=>[object XMLHttpRequest], p2=>[object Arguments])
      anonymous([object Event])

      16:11:09.138:click3:INFO:layout:isc_globalWarn_toolbar:adding newMembers: [IButton ID:isc_IButton_1],[IButton ID:isc_IButton_0] at position: 0
      16:11:09.138:click3:DEBUG:layout:isc_globalWarn_toolbar:resizing [IButton ID:isc_IButton_1]: 22h
      16:11:09.139:click3:DEBUG:layout:isc_globalWarn_toolbar:resizing [IButton ID:isc_IButton_0]: 22h
      16:11:09.143:click3:INFO:clickMask:showing click mask, action: [object Object], autoHide false , ID: isc_globalWarn, focusCanvas: null
      16:11:10.475:TMR6:DEBUG:EventHandler:mousing over [GridBody ID:isc_DRSManagementUI_8_0_body]
      16:11:10.504:TMR6:DEBUG:GridBody:isc_DRSManagementUI_8_0_body:delaying adjustOverflow: cell height changed
      16:11:10.525:TMR0:INFO:sizing:isc_DRSManagementUI_8_0_body:Specified size: 1139x596, drawn scroll size: 1139x596, border: 0x0, margin: 0x0, reason: cell height changed
      16:11:10.526:TMR0:DEBUG:sizing:isc_DRSManagementUI_8_0_body:handle sizes: {scrollLeft: 0,
      scrollTop: 0,
      scrollWidth: 1139,
      scrollHeight: 596,
      clientWidth: undef,
      clientHeight: undef,
      offsetWidth: 1139,
      offsetHeight: 596,
      styleLeft: "0px",
      styleTop: "0px",
      styleWidth: "1139px",
      styleHeight: "596px",
      styleClip: ""}
      16:11:10.526:TMR0:INFO:scrolling:isc_DRSManagementUI_8_0_body:Drawn size: 1139 by 596, specified: 1139 by 596, scrollbar state:
      16:11:10.728:KDN5:INFO:EventHandler:keyDown event with Canvas target: null, native target: [HTMLElement]{nodeName:HTML}
      16:11:10.792:KPR3:INFO:EventHandler:keyPress event with Canvas target: null, native target: [HTMLElement]{nodeName:HTML}
      16:11:10.792:KPR3:DEBUG:EventHandler:keyPress not handled natively
      16:11:11.004:MOU4:DEBUG:Messaging:keepalive on conn: isc_HiddenFrame_7

      Comment


        #4
        We've been able to make a couple of changes that should prevent this runtime error.

        However, we still need to see a stand-alone test-case so we can figure out how your code was getting into the very unusual state necessary to cause this issue in the first place.

        Comment


          #5
          Please find below a test case where the issue is happening on click of the DrawRect object (in blue color).

          package com.mycompany.mywebapp.client;

          import java.util.HashMap;
          import java.util.Iterator;
          import java.util.LinkedHashMap;
          import java.util.Map;

          import com.google.gwt.core.client.EntryPoint;
          import com.smartgwt.client.types.Cursor;
          import com.smartgwt.client.types.ListGridFieldType;
          import com.smartgwt.client.util.BooleanCallback;
          import com.smartgwt.client.util.SC;
          import com.smartgwt.client.widgets.Canvas;
          import com.smartgwt.client.widgets.drawing.DrawPane;
          import com.smartgwt.client.widgets.drawing.DrawRect;
          import com.smartgwt.client.widgets.drawing.events.ClickEvent;
          import com.smartgwt.client.widgets.drawing.events.ClickHandler;
          import com.smartgwt.client.widgets.events.DrawEvent;
          import com.smartgwt.client.widgets.events.DrawHandler;
          import com.smartgwt.client.widgets.grid.ListGrid;
          import com.smartgwt.client.widgets.grid.ListGridField;
          import com.smartgwt.client.widgets.grid.ListGridRecord;
          import com.smartgwt.client.widgets.layout.VLayout;


          /**
          * Entry point classes define <code>onModuleLoad()</code>.
          */
          public class MyWebApp implements EntryPoint {

          ListGrid marketNameGrid = null;

          public void onModuleLoad() {
          marketNameGrid = new ListGrid() {
          protected Canvas getExpansionComponent(ListGridRecord record) {
          VLayout gridLayout = new VLayout();
          gridLayout.setWidth100();
          gridLayout.setTop(2);
          gridLayout.setParentCanvas(marketNameGrid);
          gridLayout.addMember(createDrawPane(gridLayout));
          return gridLayout;
          }

          };
          marketNameGrid.setShowHeader(true);
          marketNameGrid.setCanExpandRecords(true);
          marketNameGrid.setWidth100();
          marketNameGrid.setHeight100();

          LinkedHashMap<String, String> gridDisplayFields = new LinkedHashMap<String, String>();
          gridDisplayFields.put("Name", "text");
          ListGridField[] dsFields = new ListGridField[gridDisplayFields.size()];
          int cnt = 0;
          Iterator<String> itr = gridDisplayFields.keySet().iterator();
          while(itr.hasNext()) {
          String fieldName = itr.next();
          ListGridField dsField = new ListGridField(fieldName);
          dsField.setType(ListGridFieldType.TEXT);
          dsFields[cnt] = dsField;
          cnt++;
          }
          marketNameGrid.setFields(dsFields);

          Map<String, String> map = new HashMap<String, String>();
          map.put("AA","AA");
          map.put("BB","BB");
          map.put("CC","CC");
          ListGridRecord[] record = new ListGridRecord[map.size()];
          int count = 0;
          for (String marketName : map.keySet()) {
          record[count] = new ListGridRecord();
          record[count].setAttribute("Name", marketName);
          count++;
          }
          marketNameGrid.setData(record);
          for (ListGridRecord rec : record){
          marketNameGrid.expandRecord(rec);
          }
          marketNameGrid.draw();
          }

          private DrawPane createDrawPane(final VLayout gridLayout) {
          final DrawPane drawPane = new DrawPane();
          drawPane.setCursor(Cursor.HAND);
          drawPane.setWidth100();
          drawPane.setParentCanvas(gridLayout);
          drawPane.setHeight(60);
          drawPane.setAnimateTime(1200);
          drawPane.setAutoDraw(false);
          drawPane.addDrawHandler(new DrawHandler() {
          public void onDraw(DrawEvent event) {
          DrawRect activateRectangle = new DrawRect();
          activateRectangle.setLineWidth(1);
          activateRectangle.setTop(3);
          activateRectangle.setLeft(2);
          activateRectangle.setWidth(130);
          activateRectangle.setHeight(20);
          activateRectangle.setLineColor("#0000ff");
          activateRectangle.setRounding(0.8f);
          activateRectangle.setDrawPane(drawPane);
          activateRectangle.setFillColor("#0000ff");
          activateRectangle.addClickHandler(new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
          SC.confirm("DO you want to click?", new BooleanCallback() {
          public void execute(Boolean value) {

          }
          });
          }
          });
          activateRectangle.setAttribute("parentCanvas", gridLayout.getOrCreateJsObj(), true);
          activateRectangle.draw();
          drawPane.redraw();
          }
          });
          return drawPane;
          }
          }

          Comment


            #6
            Hi Isomorphic,

            I have posted a test case which you had asked for. Can you please let me know the solution.

            Thanks

            Comment


              #7
              Just remove all three lines in your sample code that include "parentCanvas" - it's not clear what you were trying to do there, but it's misuse.

              Comment


                #8
                Hi,

                First I tried without setting parentCanvas attribute, but it did not work. I tried to set this attribute just to give a try since it was failing for parentCanvas, which did not work.

                Even without setting parentCanvas attribute, it does not work.
                Can you kindly suggest a solution at the earliest.

                Thanks
                Last edited by pankajkumarroy; 20 Mar 2014, 03:34.

                Comment


                  #9
                  Please repost your code as it is now and confirm the exact build you're using

                  Comment


                    #10
                    Hi,

                    The 4.1 smartgwt version we are using is -- SmartClient Version: v9.1p_2014-03-04/PowerEdition Deployment (built 2014-03-04)

                    Please find the latest code below

                    package com.mycompany.mywebapp.client;

                    import java.util.HashMap;
                    import java.util.Iterator;
                    import java.util.LinkedHashMap;
                    import java.util.Map;

                    import com.google.gwt.core.client.EntryPoint;
                    import com.smartgwt.client.types.Cursor;
                    import com.smartgwt.client.types.ListGridFieldType;
                    import com.smartgwt.client.util.BooleanCallback;
                    import com.smartgwt.client.util.SC;
                    import com.smartgwt.client.widgets.Canvas;
                    import com.smartgwt.client.widgets.drawing.DrawPane;
                    import com.smartgwt.client.widgets.drawing.DrawRect;
                    import com.smartgwt.client.widgets.drawing.events.ClickEvent;
                    import com.smartgwt.client.widgets.drawing.events.ClickHandler;
                    import com.smartgwt.client.widgets.events.DrawEvent;
                    import com.smartgwt.client.widgets.events.DrawHandler;
                    import com.smartgwt.client.widgets.grid.ListGrid;
                    import com.smartgwt.client.widgets.grid.ListGridField;
                    import com.smartgwt.client.widgets.grid.ListGridRecord;
                    import com.smartgwt.client.widgets.layout.VLayout;


                    /**
                    * Entry point classes define <code>onModuleLoad()</code>.
                    */
                    public class MyWebApp implements EntryPoint {

                    ListGrid marketNameGrid = null;

                    public void onModuleLoad() {
                    marketNameGrid = new ListGrid() {
                    protected Canvas getExpansionComponent(ListGridRecord record) {
                    VLayout gridLayout = new VLayout();
                    gridLayout.setWidth100();
                    gridLayout.setTop(2);
                    gridLayout.addMember(createDrawPane(gridLayout));
                    return gridLayout;
                    }

                    };
                    marketNameGrid.setShowHeader(true);
                    marketNameGrid.setCanExpandRecords(true);
                    marketNameGrid.setWidth100();
                    marketNameGrid.setHeight100();

                    LinkedHashMap<String, String> gridDisplayFields = new LinkedHashMap<String, String>();
                    gridDisplayFields.put("Name", "text");
                    ListGridField[] dsFields = new ListGridField[gridDisplayFields.size()];
                    int cnt = 0;
                    Iterator<String> itr = gridDisplayFields.keySet().iterator();
                    while(itr.hasNext()) {
                    String fieldName = itr.next();
                    ListGridField dsField = new ListGridField(fieldName);
                    dsField.setType(ListGridFieldType.TEXT);
                    dsFields[cnt] = dsField;
                    cnt++;
                    }
                    marketNameGrid.setFields(dsFields);

                    Map<String, String> map = new HashMap<String, String>();
                    map.put("AA","AA");
                    map.put("BB","BB");
                    map.put("CC","CC");
                    ListGridRecord[] record = new ListGridRecord[map.size()];
                    int count = 0;
                    for (String marketName : map.keySet()) {
                    record[count] = new ListGridRecord();
                    record[count].setAttribute("Name", marketName);
                    count++;
                    }
                    marketNameGrid.setData(record);
                    for (ListGridRecord rec : record){
                    marketNameGrid.expandRecord(rec);
                    }
                    marketNameGrid.draw();
                    }

                    private DrawPane createDrawPane(final VLayout gridLayout) {
                    final DrawPane drawPane = new DrawPane();
                    drawPane.setCursor(Cursor.HAND);
                    drawPane.setWidth100();
                    drawPane.setHeight(60);
                    drawPane.setAnimateTime(1200);
                    drawPane.setAutoDraw(false);
                    drawPane.addDrawHandler(new DrawHandler() {
                    public void onDraw(DrawEvent event) {
                    DrawRect activateRectangle = new DrawRect();
                    activateRectangle.setLineWidth(1);
                    activateRectangle.setTop(3);
                    activateRectangle.setLeft(2);
                    activateRectangle.setWidth(130);
                    activateRectangle.setHeight(20);
                    activateRectangle.setLineColor("#0000ff");
                    activateRectangle.setRounding(0.8f);
                    activateRectangle.setDrawPane(drawPane);
                    activateRectangle.setFillColor("#0000ff");
                    activateRectangle.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                    SC.confirm("DO you want to click?", new BooleanCallback() {
                    public void execute(Boolean value) {

                    }
                    });
                    }
                    });
                    activateRectangle.draw();
                    drawPane.redraw();
                    }
                    });
                    return drawPane;
                    }
                    }

                    I request you to kindly suggest a solution fast.

                    Thanks in advance
                    Last edited by pankajkumarroy; 20 Mar 2014, 22:30.

                    Comment


                      #11
                      Hi,

                      Can you please let me know the solution for this issue?

                      Thanks in Advance

                      Comment


                        #12
                        Hello,

                        Can you please provide a solution for this problem. We are not able to proceed with upgrade because of this issue.

                        Thanks and Regards
                        Pankaj

                        Comment


                          #13
                          Did you miss post #8? A fix went in on March 8th which corrected an issue caused by your incorrect usage. But you still seem to be using a March 4th build for testing.

                          If you're still seeing a problem with the latest build, we'll need details of that problem. Obviously, the error message cannot be the same (since you are not longer using the parentCanvas attribute).

                          Comment

                          Working...
                          X