I'm having trouble in making a dialog box work with a Dialog Function. The problem is, I don't even know what is the matter, because when I try to run it, Aris doesn't report any specific or generic sintax error. It simply says "Error running script". 

What is my goal with this script: I simply want to make the Ok button disabled and to make it available only if the user check the Check Box. Otherwise, only the Cancel button will be available.

I wonder if someone has any idea what am I not seeing here.

 

function dialogo(){  

var Template = Dialogs.createNewDialogTemplate(0,0,570,40,"Importação não concluída");

        Template.GroupBox(25,5, 400, 45, "Resumo da Importação")

        Template.Text(35,20,400,100, numObjAris+" objetos foram encontrados no modelo Aris.")

        Template.Text(35,30,400,100, numObjXML+" objetos foram encontrados no XML importado.")

  Template.Table(25, 55, 550, 140, ["Objeto"], [Constants.TABLECOLUMN_SINGLELINE], [120], "tabela_Objetos", Constants.TABLE_STYLE_DEFAULT);

        Template.CheckBox(420,195,200,30, "Gerar relatório de erro", "RELATORIO")

  Template.OKButton();

  Template.CancelButton();

 var criarDialogo = Dialogs.createUserDialog(Template);

        criarDialogo.setDlgListBoxArray("tabela_Objetos", objetosArray);

        criarDialogo.setDlgEnable(5, false);    

 var Result = Dialogs.show(criarDialogo);

}

function eventos(item, ação, valor){

        var retorno = false;

        switch(ação){

           case 2:

            criarDialogo.setDlgEnable(2, true);

            break;

        };

        return retorno;

}

dialogo()

 or register to reply.

Notify Moderator