issue with popups

edited October 2012 in Newbie Questions
3) I have created a popup in my parent kind to show "success" and "error" messages , am sending signals from different child to activate the popups. But the issue is when 2-3 signals fire at the same time or while sending signal if my panel is doing any transition it gets stuck and loses its reference and there is no way out to hide this except killing the application.

My code for popup is:

1) creating a popup kind
enyo.kind({
          name: "generalPopUp",
          classes: "onyx-sample-popup",
          kind: "onyx.Popup", 
          centered: true, 
          modal: true, 
          floating: true,
          scrim:true,
          classes:"_center_align _inline-block",
          style:"margin-left:auto;margin-right:auto;width:200px;",
          onShow: "popupShown", 
          onHide: "popupHidden",
          published:{
          data:"sample"
          },
          components: [
                       {content:"X",style:"",classes:"_float_right _inline-block", ontap: "hide"},
                       {tag: "br"},
                       {name:"textContent", content:""},
                       {tag: "br"},
                       
                       {
                       kind: "onyx.Button", 
                       content: "Close",
                       ontap:"hide"
                       
                       } 
                                   
                     ],
                       
          create: function (inSender,inEvent){
          this.inherited(arguments);
          } 
     });
2) handler for popup
retainPopUpInstance : "",
    showPopUp: function (inSender, inEvent) {
        var p = this.$.popup;
        if(this.retainPopUpInstance==""){            
            p.$.textContent.setContent(inEvent.popUpText);
            p.show();
        }
        
        if (this.retainPopUpInstance != "") {
            
            this.retainPopUpInstance.hide();
            p.$.textContent.setContent(inEvent.popUpText);
            p.show();
            this.retainPopUpInstance = p;
        }
        
    },

Comments

Sign In or Register to comment.