Book a Demo

Author Topic: Session.Prompt Dialog  (Read 5856 times)

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Session.Prompt Dialog
« on: January 03, 2023, 08:04:29 pm »
Has anyone else experienced the following?

In a script or Model Add-in, when using Session.Prompt to display a modal dialog, the very first time the script (or Model Add-in) is run the very first execution of a Session.Prompt command, the modal dialog is displayed minimised on the Windows task bar, rather than on the EA workspace? This gives the impression that EA has "hung up".

All subsequent executions display the dialog as expected.

Using latest build of EA v 16.1, and the behaviour is the same for Windows 10 and Windows 11.

Phil
Models are great!
Correct models are even greater!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Session.Prompt Dialog
« Reply #1 on: January 03, 2023, 08:10:36 pm »
I don't really use the Session.Prompt, but use msgbox instead. Added bonus is that it gives you a lot more options to configure it as well.

I do sometimes get pop-unders where the dialog box is underneath the main window, but that is usually when using EA on a remote desktop.

Geert


philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Session.Prompt Dialog
« Reply #2 on: January 03, 2023, 09:02:53 pm »
Many thanks Geert sound advice.

I have used DGLInputBox (as per Sparx script library), but cannot find a reference to MsgBox. Do you have any quick pointers?

Much apprecaited

Phil
Models are great!
Correct models are even greater!

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Session.Prompt Dialog
« Reply #3 on: January 03, 2023, 09:16:15 pm »
Sorry forgot to add I am using JavaScript in a Model Add-in

Phil
Models are great!
Correct models are even greater!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Session.Prompt Dialog
« Reply #4 on: January 03, 2023, 09:55:10 pm »
DLGInputBox actually executes VBscript's built in InputBox

I guess you can do the same for MsgBox. See https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/scripting-articles/sfw6660x(v=vs.84) for the offidical documentation of this function with all it's options.

Geert