I am trying to implement a generic message box that I can pass to execDialog.
However, I am getting a syntax error when I attempt to put in static text for the message portion.
Also, if I create a new Msgbox, how do I override the name and msg values....like this ????
var newbox = new (Msgbox)
newbox.name = "new title";
newbox.msg = "this is the mesage:
var Msgbox = {
result: "cancel",
DoDialog: function() {
return app.execDialog(this);
},
initialize: function(dialog) {
var dlgInit = {};
dialog.load(dlgInit);
},
commit: function(dialog) {
var oRslt = dialog.store();
},
"But1": function(dialog) {
var answer = false;
dialog.end()
},
description: {
name: "This is the Title Line",
elements: [{
type: "view",
elements: [{
type: "view"},
{item_id: "msg",
name: "text message goes here",
type: "static_text"},
align_children: "align_row",
elements: [{
type: "ok",
ok_name: "ok",
}, {
type: "button",
item_id: "But1",
name: "Cancel",
}, ]
}, ]
}, ]
}
};