Announcement

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

    Tab don't want to close

    hello,

    My problem lies in the closure of a Tab TabSet

    I have a Tab with several TabSet which each contain ListGrid: all is well for that, I can open and close my tab

    But I need to use the getRollOverCanvas of ListGrid.

    My RollOverCanvas works, I can see the pictures and click on it. But when I used the RollOverCanvas , I will can not close my tab, it goes blank and remains apparent with the following error message:

    WARN:Log:Error: Error calling method on NPObject.


    Have you ever seen this?


    François ?

    #2
    Originally posted by francois.belkorchia
    hello,

    My problem lies in the closure of a Tab TabSet

    I have a Tab with several TabSet which each contain ListGrid: all is well for that, I can open and close my tab

    But I need to use the getRollOverCanvas of ListGrid.

    My RollOverCanvas works, I can see the pictures and click on it. But when I used the RollOverCanvas , I will can not close my tab, it goes blank and remains apparent with the following error message:

    WARN:Log:Error: Error calling method on NPObject.


    Have you ever seen this?


    François ?

    I think I realized my mistake.
    Indeed, in my opinion at that removing tab, there should be a call to remove the "ListGridRecord rollOverRecord" and "HLayout rollOverCanvas", but as these two are declared as attributes of my class "application" and want remove this generates an error.

    Am I right?

    Comment


      #3
      Hello! I'm facing a similar problem, but I was no able to find out how to solve it correctly. I have a tabSet with some tabs, each tab's pane is a HStack with custom components and handlers (Stacks, Buttons, Canvas, EdgedCanvas etc.).

      When I create a new "closable" empty tab (with no Pane), it closes correctly by clicking the x icon in the tab. Contrasting, when I add the pane to the tab and then I try to close it, It sends me a "Error calling method on NPObject" message.

      I've tried destroing first the pane content. The error is fired on this action (destroy()).

      I have no idea why it is happening and how to solve. provisionally I've put my code fragment inside a try block, but it's just ignoring the error (doesn'e solve it)

      Thanks a lot!

      I'm using SmartGWT 2.5


      The contents of the Developer Console :
      Uncaught JavaScript exception [Uncaught Error: Error calling method on NPObject.] in http://127.0.0.1:8888/gnosis/sc/modules/ISC_Core.js, line 1649

      The stack trace logged in the Developer Console:
      [ERROR] [MyApp] - 13:41:42.664:MUP1:WARN:Log:Error: Error calling method on NPObject.
      unnamed() @
      unnamed() @ MyApp/hosted.html?MyApp:54:12
      unnamed() @ unknown source
      unnamed() @ MyApp/hosted.html?MyApp:76:35
      unnamed() @ MyApp/hosted.html?MyApp:54:12
      unnamed() @ unknown source
      unnamed() @ MyApp/hosted.html?MyApp:76:35
      unnamed() @ MyApp/hosted.html?MyApp:54:12
      __destroy() @ unknown source
      unnamed() @ unknown source
      unnamed() @ MyApp/hosted.html?MyApp:76:35


      Sample code:

      //Tab Adding
      ...
      Tab tab = new Tab("Tittle");
      tab.setPane(vista);//vista extends HLayout
      tab.setCanClose(true);
      ((TabSet)container).addTab(tab);
      ((TabSet)container).selectTab(tab);
      ...


      //Provisional try block on the TabSet
      addCloseClickHandler(new CloseClickHandler() {

      @Override
      public void onCloseClick(TabCloseClickEvent event) {
      try {
      event.getTab().getPane().destroy();
      }
      catch(Exception e) {
      //just ignore the case
      }
      }
      });
      Last edited by MagusDrk; 15 Nov 2011, 10:50.

      Comment

      Working...
      X