Hi guys. This will be a question from Rookie-ville, so please bear with me.
I have a situation where NonlinearModelFit gets called repeatedly, and sometimes generates an error message due to the initial parameters I've given it. When this happens, I would like to generate a pop-up dialog window that shows me any error/warning messages generated, and allows me to enter different initial parameters and try the fit again. I've got almost everything figured out, but I'm missing something about how to pass and display the entire messages in the dialog window (instead of the notebook).
A simplified illustration might be this:
Quiet[ Check[ 1/0, errors = $MessageList; myDialog[errors]; ] ];
Somewhere in the 'myDialog' function (which defines my pop-up), I should be able to take the 'errors' parameter, and reconstitute the full message:
Power::infy: "Infinite expression 1/0 encountered. "
My best guess so far was to use something like (assuming a single message):
Message[ errors[] //ReleaseHold ]
but that definitely does not work.
Any pointers would be much appreciated. Thanks a bunch, and have a great day.