Skip to Content
0

Personas 3 - Having issues with session showOptionDialog

Oct 17, 2016 at 03:43 PM

300

avatar image
Former Member

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.");
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Brian Wills Oct 19, 2016 at 05:07 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Brian Wills Oct 17, 2016 at 07:50 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Thomas Mangler Oct 18, 2016 at 06:32 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded