Popup window bye code

Popup window bye code

viktor_tt
Not applicable
5 Views
1 Reply
Message 1 of 2

Popup window bye code

viktor_tt
Not applicable

[ FlexSim 18.0.1 ]

Hello!

In my simulation, I've implemented an error message system

(with msg() command), which create a popup message if one of my for() cycles do not found the correct value.

How can I write a codeline which automatically open the window which contain this code what printed the error message earlier?

If it's not so clear:

for() running --> there is no corrent value --> popup a message dialog --> I close the dialog --> automatically open the code window which contain the for() cycle.

0 Likes
Accepted solutions (1)
6 Views
1 Reply
Reply (1)
Message 2 of 2

mischa_spelt
Advisor
Advisor
Accepted solution

If you write the debug() command in your code, it will act like a manual breakpoint. So your code could be something like

for(...) {
  checkValue();
  if(!value) {
    if(msg("No value", "There is no value. Do you want to debug the code?", 4)) {
      debug();
    }
  }
}