cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3 - Having issues with session showOptionDialog

former_member238607
Participant
0 Kudos

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.");

Accepted Solutions (0)

Answers (3)

Answers (3)

bwills
Contributor
0 Kudos

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

Thomas_Mangler
Active Participant
0 Kudos

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

bwills
Contributor
0 Kudos

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".