Skip to Content

Personas 3 - Having issues with session showOptionDialog

Hi,

We are running Personas 3, SP03, with the latest client and kernel. I'm trying to use the session.utils.showOptionDialog function in my script. The command itself works fine, but it halts the remainder of my script from running. For example, in the script below, the showOptionDialog message appears, but the alert after it does not.

Has anyone else ran across this issue, and is there a way to resolve it? Thank you very much for your help!

session.utils.showOptionDialog("Test", "This dialog box works.", session.utils.MESSAGE_TYPE_INFORMATION, session.utils.MESSAGE_OPTION_OK, undefined, undefined);

alert("This alert does not.");
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 19, 2016 at 05:07 PM

    I think it is supposed to work this way. It pops up a dialog box that needs action.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 17, 2016 at 07:50 PM

    I think it is supposed to work this way. It is waiting for the users action, like clicking OK, etc. If you are trying to give a message to the user try the "setMessage" method of the GuiStatusBar. It will hit the "alert" message. If you want to stop the script then use "return true".

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 18, 2016 at 06:32 AM

    Hi,

    yes, "session.utils.showOptionDialog" with "undefined" function in it finishes the script.

    If you want to do further scripting depending on the answer of the messagebox you have to replace the "undefinded" position by the function Name "OptionDialogClose".

    session.utils.showOptionDialog("Test", "This dialog box works.", session.utils.MESSAGE_TYPE_INFORMATION, session.utils.MESSAGE_OPTION_OK, onOptionDialogClose, "1");
    function onOptionDialogClose(){alert("This alert does not.");}

    Regards

    Thomas

    Add comment
    10|10000 characters needed characters exceeded