03-24-2016 10:38 AM
Hi All,
I am creating a simulation where 3 seperate factors have to be set before the simulation begins. I have set this up by having 3 buttons to set these factors and checkboxes to visually see that the buttons have been clicked. These factors and checkboxes are reset when resetting the simulation.
My question is that is there a way you can have a pop up or a warning that triggers if you try to initialise the simulation when these factors haven't been reset? (i.e the buttons have not been clicked). I am creating this simulation for people that have no experience with the software so I am trying to make it as user friendly as possible.
Any help on this would be greatly appreciated!
Kind Regards,
Nathan
Solved! Go to Solution.
03-24-2016 10:50 AM
Hello Nathan,
you can do something like this in your init-method:
if not (check1.value and check2.value and check3.value) then messageBox("Warning! The Model was not prepared properly!",1,3); root.eventController.stop(false); root.eventController.reset; end;
Hope this helps!
Alex
03-24-2016 11:18 AM
Works perfectly, thank you very much!
I had not come accross the messageBox before!
Thanks again,
Regards,
Nathan