Announcement

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

    tabDeselected and warning dialog

    SmartClient 2012-02-08_v8.2p/PowerEdition

    if I use a tabDeselected handler to prevent selecting a tab under certain circumstances, and I try also to warn the user, the tabDeselected is called everytime I click OK on the dialog.

    is it a bug, or am I misusing the TabSet api?

    you can try it in the showCase, modifying the #selectionEvents sample,
    adding a isc.warn('Warning') in the tabDeselected handler:
    Code:
    isc.Label.create({
        ID:"welcomePane",
        contents:"Welcome to the application",
        styleName:"exampleTextBlock",
        width:"100%", 
        align:"center"
    });
    
    isc.TabSet.create({
        ID: "tabSet",
        width: 400,
        height: 200,
        tabs: [{
            ID: "welcome",
            title: "Welcome",
            pane: welcomePane
    
        },{
            ID: "preferences",
            title: "Preferences",
            tabSelected : function (tabSet, tabNum, tabPane, ID, tab) {
                isc.Log.logWarn("zero" + tabPane + " null:" + (tabPane == null));
                
                if (tabPane == null) {
                    isc.DynamicForm.create({
                        ID: "preferencesPane",
                        fields: [{
                            name: "useISCTabs",
                            title: "Use SmartClient tabs",
                            type: "checkbox",
                            defaultValue: false,
                            required: true
                        }]
                    });
                    tabSet.updateTab(ID, preferencesPane);
                }
            },
            tabDeselected : function (tabSet, tabNum, tabPane, ID, tab, newTab) {
                if (!tabPane.getValue("useISCTabs")) {
                    isc.warn('Warning');
                    return false;
                }
            }
        }]
    });
    Last edited by claudiobosticco; 5 Mar 2012, 01:34. Reason: fixed

    #2
    This is mostly like an issue where, because the modal dialog steals keyboard focus, we think the tab is being de-selected again. What browser(s) and environments is this happening in for you?

    Comment


      #3
      FF10.0.1 and chrome 17.0.963.56 both on Win XP
      if I put only a log message instead of the warning message, the log it's printed two times every time I try to deselect the tab
      when I add the warn, the log it's printed one time, then it's printed two times for every 'ok' click on the dialog button
      note that after clicking outside the browser window it's possible to dismiss the dialog

      no problem at all on IE8

      Comment


        #4
        We've made a change to address this issue in both 3.0p and 3.1d branches
        Please try the next nightly build (dated Feb 23 or higher)
        Thanks
        Isomorphic Software

        Comment


          #5
          yes, I confirm it's fixed, thank you very much.

          Comment

          Working...
          X