!7 module YesPopupModule { transient YesPopup popup; transient S moduleID; // which module are we showing the popup for transient long popupSince; void cleanMeUp { hidePopup(); } void hidePopup { removeFromParent(popup); popup = null; moduleID = null; popupSince = 0; } // API void showYesPopup(S moduleID, Component component, O... _) { hidePopup(); popup = showYesToAcceptPopup(component, _); this.moduleID = moduleID; popupSince = now(); } void hideYesPopup(S moduleID) { if (eq(moduleID, this.moduleID)) hidePopup(); } bool popupShowing() { ret isShowing(popup); } }