Toggle AutoStatus
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
3 posts
• Page 1 of 1
Toggle AutoStatus
I really think there should be an ⌶ for doing this, and I want to encourage everybody sharing my opinion to say so in this thread because then Dyalog might actually implement this.
However, Vince provided a slightly dirty Windows-only solution:
Background is that sometimes I do stuff that is known to produce unhelpful error messages in the status window. Fire for example investigates variables under certain circumstances, and that can - though rarely - result in "Cannot be owned by a status bar" which does not help at all, so I want to hide that from the user.
However, Vince provided a slightly dirty Windows-only solution:
ToggleAutoStatus←{
⍝ Toggle whether the AutoStatus menu item is checked or not.
⍝ ⍵ must be either 1 (checked) or 0 (not checked) or `?`.
⍝ Otherwise an error is thrown.
⍝ Use this to temporarily switch it off and back on again later.
⍝ Returns the status of the menu item as shy result.
⍝ A '?' as right argument reports the status without any change.
~(⊂⍵)∊0 1 '?':'Invalid right argument (0, 1 or ''?'')'⎕SIGNAL 11
currentStatus←↑1↑↑(//)⎕VFI 2 ⎕NQ'.' 'GetEnvironment' 'ShowStatusOnError'
⍵≡'?':r←currentStatus
(,currentStatus)≡,⍵:r←currentStatus
f←⎕NEW'Form'(⊂'Visible' 0)
b←f.⎕NEW'Button'(⊂'Event'('Select' '[AutoStatus]'))
_←0 ⎕NQ b'select'
1:r←~currentStatus
}
Background is that sometimes I do stuff that is known to produce unhelpful error messages in the status window. Fire for example investigates variables under certain circumstances, and that can - though rarely - result in "Cannot be owned by a status bar" which does not help at all, so I want to hide that from the user.
-
kai - Posts: 137
- Joined: Thu Jun 18, 2009 5:10 pm
- Location: Hillesheim / Germany
Re: Toggle AutoStatus
So, nobody is supporting the idea? Ah well...
I've edited the original function; as it turned out sometimes "currentStatus" is an empty vector, therefore
needs to be
I've edited the original function; as it turned out sometimes "currentStatus" is an empty vector, therefore
- Code: Select all
currentStatus=⍵:r←currentStatus
needs to be
- Code: Select all
(,currentStatus)≡,⍵:r←currentStatus
-
kai - Posts: 137
- Joined: Thu Jun 18, 2009 5:10 pm
- Location: Hillesheim / Germany
Re: Toggle AutoStatus
I support the idea of an I-Beam to toggle autostatus (especially because we need something cross platform), but it is part of a larger body of issues so we won't be looking at it until after Dyalog'17.
-
Morten|Dyalog - Posts: 453
- Joined: Tue Sep 09, 2008 3:52 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group