2

I have an output which I want to hide if there is an error otherwise display it. The output is a Dynamic[output] so I can't simply use something like

If[IntegerQ[output],output,""]

or

If[Head[output]==Integer,output,""]

becasue it seems that although this method would work for other items such as integers, text and so on, a dynamic object stays a dynamic object whether there is an error or not. What I am looking for is something that does the following

If there is an error occuring when I display this dynamic object, display nothing otherwise display the dynamic object.

I have tried the Check and Quiet functions together and what I get is below. I don't care about the typed error messages but I'm talking about the output cells that look like red blocks with writing inside of them. I hope this explains things better. I have put a picture instead of code becasue there are a lot of background definitions for all the things in the grid that would be too long to put here.

Check and Quiet

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
lara
  • 1,028
  • 7
  • 17
  • There is a whole lot of code defining all this stuff. I posted the picture so you could see the results without having to look at all the background code. – lara Jan 30 '14 at 09:57
  • 1
  • @LaraJordan So please create a minimal working example. – Kuba Jan 30 '14 at 10:01
  • Thanks Mr. Wizard. It is definately a case of one of these 'front end' error messages so likely nothing normal to supress kernel error messages will work. – lara Jan 30 '14 at 10:13
  • You're welcome. I wish I had more to offer. – Mr.Wizard Jan 31 '14 at 05:29
  • It would really help if you were to add a minimal example (real code, not an image) that generates the problem you want help with. As it is, there is no way someone who wants to help can experiment with your situation. – m_goldberg May 01 '14 at 17:23

0 Answers0