Hello -
I programmed a "dialog box"…
The "CANCEL" button works perfectly.
But the "OK" doesn't work as I wish.
In fact, it should:
- Close/hide the dialog box.
- And call the following function "commonCleaningArtworkPart_One_fct();";
With the below code, it doesn't close the dialog box at all but it run the script.
Now if I comment the line 20, well it close the dialog box (and of course it doesn't run the script, which is logic, since the function isn't called…)
Any idea why the dialog box doesn't close?
… dialogBox_DC.onShow = function() { dialogBox_DC.frameLocation = [dialogBox_X, dialogBox_Y]; dialogBox_DC.size = [dialogBox_Width, dialogBox_Height]; } dialogBox_DC.btnPnl = dialogBox_DC.add('group', undefined, 'Do It!'); dialogBox_DC.btnPnl.orientation='row'; dialogBox_DC.btnPnl.buildBtn1 = dialogBox_DC.btnPnl.add('button',[15,15,115,35], 'Cancel', {name:'cancel'}); dialogBox_DC.btnPnl.buildBtn2 = dialogBox_DC.btnPnl.add('button', [125,15,225,35], 'OK', {name:'ok'}); dialogBox_DC.btnPnl.buildBtn1.onClick = scriptCanceled_fct(); dialogBox_DC.btnPnl.buildBtn2.onClick = function closeDialogBox_And_callTheCommonCleaningArtworkPartOneFunction_fct() { dialogBox_DC.close(); app.redraw(); commonCleaningArtworkPart_One_fct(); } dialogBox_DC.show(); // // Translate dialog here = Take the value of the selected pack type (from the dialog box) // var itis_a_TetraEdge1l = dialogBox_DC.alertBtnsPnl1.selectEdge1l.value; var itis_a_Crt4x125g = dialogBox_DC.alertBtnsPnl1.selectCrt4x125g.value; var itis_a_TetraPrisma = dialogBox_DC.alertBtnsPnl1.selectPrisma.value;…
Thank you,
- Dimitri