module Ext_window_MessageBox:Utility class for generating different styles of m ...sig..end
Utility class for generating different styles of message boxes. The singleton instance, Ext.MessageBox
alias Ext.Msg can also be used.
Note that a MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt
browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code
that should only run after some user feedback from the MessageBox, you must use a callback function
(see the function parameter for show for more details).
Basic alert
Ext.Msg.alert('Status', 'Changes saved successfully.');
Prompt for user data and process the result using a callback
Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
if (btn == 'ok'){
// process text value and close...
}
});
Show a dialog using config options
Ext.Msg.show({
title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
icon: Ext.Msg.QUESTION
});
class type t =object..end
class type configs =object..end
class type events =object..end
class type statics =object..end
val of_configs : configs Js.t -> t Js.tof_configs c casts a config object c to an instance of class tval to_configs : t Js.t -> configs Js.tto_configs o casts instance o of class t to a config object