Program Control of the Status Window?
6 posts
• Page 1 of 1
Program Control of the Status Window?
I have a little application that reads XML files - some of these files are badly formed (their content is out of my control) and when using ⎕XML to create an array errors get thrown up and displayed in the APL Status Window. Which is all well and good, but the novelty wears off after a while and I'd like the issue to be less obtrusive (for example I can collect the errors and put them into a log file).
My session is set with AutoStatus ON - because in general I like it like that except when I'm running this particular application.
I see the parameter ShowStatusOnError, and I can use #.GetEnvironment to retrieve the setting.
I am yearning for a #.SetEnvironment that I could use to set parameters like this temporarily while applications are running - I really don't want to fiddle around with registry settings, and I also see the potential issue that parameters can be derived from alternative places (maybe Dyalog could have a parameter cache which grabs them all at startup and puts them into a handy location for the duration).
Maybe ⎕XML ought not put its errors into the Status Window? Or perhaps there could be another option for the left argument so that it failed quietly if the XML was poorly-formed?
My session is set with AutoStatus ON - because in general I like it like that except when I'm running this particular application.
I see the parameter ShowStatusOnError, and I can use #.GetEnvironment to retrieve the setting.
I am yearning for a #.SetEnvironment that I could use to set parameters like this temporarily while applications are running - I really don't want to fiddle around with registry settings, and I also see the potential issue that parameters can be derived from alternative places (maybe Dyalog could have a parameter cache which grabs them all at startup and puts them into a handy location for the duration).
Maybe ⎕XML ought not put its errors into the Status Window? Or perhaps there could be another option for the left argument so that it failed quietly if the XML was poorly-formed?
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
Re: Program Control of the Status Window?
Hi Dick,
I've moved this topic into the Windows: GUI, COM/OLE/ActiveX forum as I feel this forum is more appropriate.
While there is a ⎕NA to SetEnvironmentVariable, this will not affect the ShowStatusOnError that we look at.
You can do the following to toggle the ShowStatusOnError flag:
0 ⎕nq '⎕SE.mb.tools.status_error' 'select'
If you wanted to create your own button to toggle the ShowStatusOnError flag, you could do this:
'f.b'⎕WC'button' ('event' 'select' '[AutoStatus]')
Regards,
Vince
I've moved this topic into the Windows: GUI, COM/OLE/ActiveX forum as I feel this forum is more appropriate.
While there is a ⎕NA to SetEnvironmentVariable, this will not affect the ShowStatusOnError that we look at.
You can do the following to toggle the ShowStatusOnError flag:
0 ⎕nq '⎕SE.mb.tools.status_error' 'select'
If you wanted to create your own button to toggle the ShowStatusOnError flag, you could do this:
'f.b'⎕WC'button' ('event' 'select' '[AutoStatus]')
Regards,
Vince
- Vince|Dyalog
- Posts: 408
- Joined: Wed Oct 01, 2008 9:39 am
Re: Program Control of the Status Window?
Thank you, that seems to have done the trick.
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
Re: Program Control of the Status Window?
We will improve the reporting of error information, so watch this space.
- Vince|Dyalog
- Posts: 408
- Joined: Wed Oct 01, 2008 9:39 am
Re: Program Control of the Status Window?
It would be good if error notifications all appeared in one place - having some stuff show up the old-fashioned way (GOOFUP ERROR in the session, ⎕DM and so forth) and some in the Status Window confuses.
I think I'd be pleased for the Status Window to be put out of its misery (even allowing for the hocus-pocus that AndyS showed me that lets me grab its content and do some APL).
I think I'd be pleased for the Status Window to be put out of its misery (even allowing for the hocus-pocus that AndyS showed me that lets me grab its content and do some APL).
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
Re: Program Control of the Status Window?
Vince|Dyalog wrote:[...]
You can do the following to toggle the ShowStatusOnError flag:
0 ⎕nq '⎕SE.mb.tools.status_error' 'select'
[...]
Quick update - this worked fine for me embedded in some application code until yesterday afternoon, when the Status Window made an unwelcome reappearance.
Read the manual (sometimes a good idea), and...
1 ⎕nq '⎕SE.mb.tools.status_error' 'select'
banishes the Status Widow to limbo once more.
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
6 posts
• Page 1 of 1
Return to Windows: GUI, COM/OLE/ActiveX
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group