Skip to content

Commit

Permalink
Acre 4.2 compatible and some minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Apr 10, 2018
1 parent f5bc171 commit 33143be
Show file tree
Hide file tree
Showing 65 changed files with 125 additions and 128 deletions.
2 changes: 1 addition & 1 deletion APLSource/Fire-1/GUI-7/CheckStartButton-421.function
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CheckStartButton{
n.StartBtn.Activen.NamesOnly.State(0<+/n.(Code Vars).State)n.Vars.State0<+/n.(APL_Code Comments Text).State
n.StartBtn.Activen.NamesOnly.State(0<+/n.(Code Vars).State)0<+/n.(APL_Code Comments Text).State
1:r
}
2 changes: 1 addition & 1 deletion APLSource/Fire-1/GUI-7/ClickFindButton-221.function
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Clicks the find button and returns a zero, Called when user did press <Enter>
({0=⎕NC :0 1⎕NQ()'GotFocus'}'n.Form.ReplaceForm'):0 Ignore when the "Replace" dialog is open (but does not have the focus)
hasFocus2 ⎕NQ'.' 'GetFocus'
(n.ReplaceBtn≡⍎hasFocus):1 ⍝ Not when the "Replace" button has the focus! ⍝ Doesn't not always work: <00503>
(n.ReplaceBtn≡⍎hasFocus):1 ⍝ Not when the "Replace" button has the focus! ⍝ Does not always work: <00503>
(/1¨'.'##.A.SplitPath¨(n.ReplaceBtn)hasFocus):1 Circumvention of bug <00503>
_⎕NQ n.StartBtn'Select'
0
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire-1/GUI-7/LetAcreDelete-89.function
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
r
:If ##.IsAnyAcreAround
:If 0<⎕NC'⎕SE.acre'
{}{⎕SE.UCMD'acre.Erase ',,' [ messages''off'' ]'}¨GetFullPath¨rows
{}{⎕SE.UCMD'acre.Erase ',,' -messages=''off'''}¨GetFullPath¨rows
:EndIf
:If 0<⎕NC'#.acre'
{}#.acre.Erase GetFullPath¨rows
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire-1/GUI-7/OnKeyPressInLookIn-11425.function
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:If 0,n.LookIn.Text
r0
:If '#'=2y
n.LookIn.Text'#.'
n.LookIn.Text'#'
:ElseIf ''=2y
n.LookIn.Text'⎕SE'
:EndIf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Handle some special keystrokes
rf0
n.Form.LastKey[4 5]
(40 0[4 5])0rf.Items:0 CursorDown but no items to select from? Suppress!
([4 5]46 2):0DropCurrentFromComboList rf Ctrl+DEL?!
([4 5]9 2):⎕NQ'⎕SE' 'GotFocus' Ctrl+Tab?!
([4 5]39 0):1 <CursorRight>?! Let it pass
Expand Down
33 changes: 17 additions & 16 deletions APLSource/Fire-1/GUI-7/OnStartBtn-85.function
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,30 @@
replace `parms` by `parms`...
r0
⎕IO0 ⎕ML3 To overcome bug <01001>
⎕TRAP(988 'C' '→∆RegExFailed')(0 'S')
:If CheckForConsistency GetRefTo_nmsg
{}WriteInfo'Search cancelled'
:Return
:EndIf
{}CopyGuiToGlobal''
ref_____⎕NS'' Trick to hide `parms` from Fire itself.
ref_____.parms_____PrepareSearch
:If 0ref_____.parms_____.successFlag_____
:Else
⎕TRAP(988 'C' '→∆RegExFailed')(0 'S')
{}CopyGuiToGlobal''
ref_____⎕NS'' Trick to hide `parms` from Fire itself.
ref_____.parms_____PrepareSearch
:If 0ref_____.parms_____.successFlag_____

(flag hits noOfObj noOfContainers)##.RunSearch~n.ReuseSearch.State <=== work horse
(flag hits noOfObj noOfContainers)##.RunSearch~n.ReuseSearch.State <=== work horse

hitsCheckHitList hits
ProcessSearchResult flag hits noOfObj noOfContainers ref_____.parms_____.cursorWas_____
:EndIf
:If 0n.HitList.ReportInfo
n.SearchFor.SelText21+,n.SearchFor.Text
⎕NQ n.SearchFor'GotFocus'
:Else
n.ReportHits.Active1
hitsCheckHitList hits
ProcessSearchResult flag hits noOfObj noOfContainers ref_____.parms_____.cursorWas_____
:EndIf
:If 0n.HitList.ReportInfo
n.SearchFor.SelText21+,n.SearchFor.Text
⎕NQ n.SearchFor'GotFocus'
:Else
n.ReportHits.Active1
:EndIf
:EndIf
:Return

⍝⍝ Error trapping routine ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
∆RegExFailed:
User is informed by now
{}##.DisableProgressbar
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire-1/GUI-7/PrepareSearch-81.function
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(parms_____)PrepareSearch
(parms_____)PrepareSearch dummy
Prepare for the search.
Returns 1 for "carry on" and 0 otherwise.
Returns a namespace in order to avoid name clashes, in particular when Fire searches itself.
Expand Down
46 changes: 12 additions & 34 deletions APLSource/Fire-1/History-1.function
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
History
* 6.5.0
* Fire 6.5 is compatible with acre 4.2 and better only. If you use an older version of
acre then you should only update after you've moved to acre 4.2.0 or better. This is due
to the introduction of `-flags` in acre 4.2.0.
* Bug fixes:
* In case <CursorDown> was pressed in "Search for" but no items were available to select from
the contents of the "Search for" edit control was deleted anyway.
* When "Search hit list" was ticked then later the field "Start looking here" remained under
under certain circumstances.
* When `#` was typed into an empty "Search hit list" a `.` was wrongly added automatically.
* Under certain circumstances the "Find" button became active when it should not.
* 6.4.2
* Under certain circumstances which are still not understood Fire can become very slow.
This it a Dyalog bug but 6.4.2 gets around that.
Expand All @@ -15,37 +26,4 @@
* When "Compare one-by-one" (Replace) was selected and acre 4 active then there was a problem.
* Right-click on "Search for" crashed Fire.
* 6.3.0
* Fire is now compatible with acre 2, 3 and 4.
* 6.2.1
* Bug fixes
* Pressing a key in "Start looking here" could break Fire in case the list was empty.
* The name class in the "Hit" report showed a local separator. Is now always a dot.
* The "Action" column in the "Hit" was not always visible.
* The help file(s) where not always found.
* RegEx expressions crashed in version 16.0.
* Some non-changeable varaiables were not removed from the hit list before a Replace operation.
* 6.2.0
* "Report Hits" improved:
* Renamed to "Report details".
* By default only lines with hits are shown but with the newly introduced "Show all lines" check box the user might
view all lines.
* Clicking on an object in the TreeView scrolls to that object.
* Styling improved.
* "Preview" is scrolled automatically when a line is clicked.
* "Preview" is scrolled automatically when one of these keys is pressed: CursourUp, CursorDown, Home, End, PageUp, PageDown
* Internal improvements: uses Edge now and produces HTML5.
* "Replace Report" improved:
* The space bar now toggles the check bos
* "Preview" is scrolled automatically when a line is clicked.
* "Preview" is scrolled automatically when one of these keys is pressed: CursourUp, CursorDown, Home, End, PageUp, PageDown
* Styling improved.
* Autocomplete does not allow entering keystrokes that do not fit anyway.
* Bug fixes:
* "Match APL name" was not honoured when "Name list only" was ticked.
* A RegEx search could crash depending on the contents of fns/opr/vars.
* With "Comments" not ticked "Report details" might go wrong.
* The "Replace" button remained active when a name was copied from to hit list to "Search for" (F6).
* The "Detailed report" was not always made inactive when it should.
* 6.1.1
* Autocomplete in "Start looking here" improved.
* "Replace by" improved, in particular the context menu.
* Fire is now compatible with acre 2, 3 and 4.0
4 changes: 1 addition & 3 deletions APLSource/Fire-1/Question-1/ShowMsg-11.function
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{r}{addToCaption}ShowMsg msg;cs
Show a piece of information
r1
:If ##.G.TestFlag
msg
:Else
:If ~##.G.TestFlag
csCreateDefaultParms
cs.cancelCaption''
:If 0<⎕NC'addToCaption'
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire-1/Replace-1/FixScript-9.function
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
:EndSelect
:EndTrap
:Until flag
TellAcre taa
##.G.TestFlag TellAcre taa
Done
2 changes: 1 addition & 1 deletion APLSource/Fire-1/Replace-1/FixVars-9.function
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Returns 1 when the user has cancelled the process, otherwise 0.
r0
(ref),'.',name,'←data'
TellAcre(ref),'.',name
##.G.TestFlag TellAcre(ref),'.',name
Done
2 changes: 1 addition & 1 deletion APLSource/Fire-1/Replace-1/QFIX-f.function
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
r1 :Return
:EndSelect
:EndIf
TellAcre(ref),'.',{' '}(':Namespace ')0script
##.G.TestFlag TellAcre(ref),'.',{' '}(':Namespace ')0script
Done
4 changes: 2 additions & 2 deletions APLSource/Fire-1/Replace-1/QFX-7.function
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:If 3=⎕NC'#.acre.Erase'
{}#.acre.Erase(ref),'.',name
:ElseIf 9=⎕NC'⎕SE.acre'
{}⎕SE.UCMD'acre.Erase ',(ref),'.',name,' [ messages''off'' ]'
{}⎕SE.UCMD'acre.Erase ',(ref),'.',name,' -messages=''off'''
:Else
. Huuh?! Acre is around and isn't?!
:EndIf
Expand Down Expand Up @@ -42,7 +42,7 @@
:EndSelect
:Else
flag1
TellAcre(ref),'.',name
##.G.TestFlag TellAcre(ref),'.',name
:EndIf
:Until flag
:EndIf
8 changes: 4 additions & 4 deletions APLSource/Fire-1/Replace-1/TellAcre-11.function
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{r}TellAcre name;buff;flag
{r}testFlag TellAcre name;buff;flag
Tells acre that ⍵ (fully qualified name) got changed.
Returns 0 in case acre did not take action and 1 otherwise
r
:If ~0name
:AndIf ##.IsAnyAcreAround
:If 9=⎕SE.⎕NC'acre'
We should catch acre's messages here and then restore the original settings but we cannot do this with the current version of acre.
flag~0' '~⎕SE.UCMD'Acre.SetChanged ',(name),' [ messages''off'' ]'
flag~0' '~⎕SE.UCMD'Acre.SetChanged ',(name),' -messages=''off'''
:ElseIf 9=#.⎕NC'acre'
flag~0' '~#.acre.SetChanged name
:EndIf
:If flag
:If flag0=testFlag
'acre was told successfully about ',name
:Else
:ElseIf 0=testFlag
'acre was told but not interested in ',name
:EndIf
:EndIf
6 changes: 3 additions & 3 deletions APLSource/Fire-1/RunSearch-9.function
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(rc objHits noOfObj noOfContainers)RunSearch flag;list;_;buffer;Performs
(rc objHits noOfObj noOfContainers)RunSearch flag;list;_;buffer;Performs;toggleStatusWas
Performs the actual search.
If "flag" is 1 then either the workspace or ⎕SE is scanned.
If "flag" is zero then only the current hit list is scanned.
Expand All @@ -7,7 +7,7 @@
rc might become ¯1 one day when we allow the user to cancel a search operation.
`objHits` reports objects that carry a hit.
rc1 objHits'' noOfObj0
ToggleAutoStatus 0
toggleStatusWasToggleAutoStatus 0
(0⎕SI)⎕STOP(⎕STOP 0⎕SI){StopInSearch:, ~}1+0⎕LC
:If 0=G.(Code+Vars)
(list noOfContainers)GetNames flag
Expand Down Expand Up @@ -47,5 +47,5 @@
objHitsDropDoublesFromHitList objHits
:EndIf
:EndIf
ToggleAutoStatus 1
ToggleAutoStatus toggleStatusWas
Done
2 changes: 1 addition & 1 deletion APLSource/Fire-1/ToggleAutoStatus-441.function
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ToggleAutoStatus{
Toggle whether the AutoStatus menu item is checked or not.
Toggles 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 result.
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire-1/Version-1.function
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rVersion
See also `History`
r(1¯1⎕NPARTS⎕THIS)'6.4.2' '2018-03-18'
r(1¯1⎕NPARTS⎕THIS)'6.5.0' '2018-04-10'
2 changes: 0 additions & 2 deletions APLSource/TestCases-11/Cleanup-1.function
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
1 ⎕NQ n.Form'Close'
:If ∆IsAcre2Or3
{}⎕SE.UCMD'acre.SetProperty Fire displaymethod ""'
:Else
{}⎕SE.UCMD'acre.projects [messages←''on'']'
:EndIf
⎕EX'∆IsAcre2Or3'
{}⎕WA
Expand Down
6 changes: 4 additions & 2 deletions APLSource/TestCases-11/CloseFire-21.function
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CloseFire
:Trap 0 {}⎕NQ #._Fire.Fire.GUI.n.Form'Close' :EndTrap
CloseFire;_
:Trap 0
_⎕NQ #._Fire.Fire.GUI.n.Form'Close'
:EndTrap
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/CopyTestData-111.function
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CopyTestData
#.⎕EX'#.TestData'
'#.TestData'⎕NS''
#.TestData.⎕CY'Fire_Test'
#.TestData.⎕CY'C:\T\Projects\APL-cation\Fire\Fire_Test'
'A2'#.⎕CY'Fire_Test'
3 changes: 2 additions & 1 deletion APLSource/TestCases-11/Initial-1.function
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Initial parms;l
⎕IO0 ⎕ML3
#.Tester.EstablishHelpersIn
ShowWarning
CopyTestData
#.TestData.GUI_Instance.Make Converts that namespace into a GUI. Is then name class 9.2
:Trap 0 {}⎕SE.UCMD'acre.Projects' :EndTrap
Expand All @@ -9,6 +10,6 @@
:If ∆IsAcre2Or3
{}⎕SE.UCMD'acre.SetProperty Fire displaymethod NULL'
:Else
{}⎕SE.UCMD'acre.Projects [ messages''off'' ]'
{}⎕SE.UCMD'acre.Projects -messages=''off'''
:EndIf
Done
15 changes: 15 additions & 0 deletions APLSource/TestCases-11/ShowWarning-11.function
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{r}ShowWarning dummy
r
(⎕PW-1)'-'
'*** NOTE:'
''
'Quite a number of Fire''s test cases are sensitive to timing issues. This is more likely to be an issue'
'on slow machine but it can happen even on the fastest machine.'
''
'Rather than slowing down all of the test cases it was decided to accept that and use `RunDebug` and'
'simply run failing test cases again. It is very likely to succed then'
''
'In order to continue press <enter>'
''
{}
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/Test_HitReport_003-121.function
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
n.Comments.State0

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
#._Fire.Fire.G.TestFlag1
n2#._Fire.Fire.ReportHits.Run 1
∆Process n.Form
Expand Down
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/Test_RegExReplace_001-521.function
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
n.Greedy.(Active State)1

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp 1n.HitList.ReportInfo

{}∆Select n.ReplaceBtn
Expand Down
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/Test_RegExReplace_002-521.function
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
n.Greedy.(Active State)1

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp 1n.HitList.ReportInfo

{}∆Select n.ReplaceBtn
Expand Down
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/Test_RegExReplace_003-521.function
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
n.(Greedy DotAll).(Active State)1

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp 1n.HitList.ReportInfo

{}∆Select n.ReplaceBtn
Expand Down
2 changes: 1 addition & 1 deletion APLSource/TestCases-11/Test_RegExSearch_022-521.function
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
n.SearchIsRegEx.State1

{}∆Select n.StartBtn
0.5 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp~n.HitList.Items ∆LazyMatch'Foo_2' 'Hello_2' 'Sub1Hello_2' 'Sub1Foo_2' 'Sub2Hello_2' 'Sub2Foo_2' 'Sub3_Hello2' 'Sub3HelloNS_2' 'Sub_3' 'Sub_4'
R∆OK

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
n.LookIn.Text'#.TEMP'

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp~n.HitList.Items ∆LazyMatch'MyClass'

{}∆Select n.ReplaceBtn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
n.LookIn.Text'#.TEMP'

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp~n.HitList.Items ∆LazyMatch'MyClass'

{}∆Select n.ReplaceBtn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
n.LookIn.Text'#.TEMP'

{}∆Select n.StartBtn
1 ∆Process n.Form
0.2 ∆Process n.Form
GoToTidyUp~n.HitList.Items ∆LazyMatch'myDfns'

{}∆Select n.ReplaceBtn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
n.LookIn.Text'#.TEMP'

{}∆Select n.StartBtn
1 ∆Process n.Form
0.3 ∆Process n.Form
GoToTidyUp~n.HitList.Items ∆LazyMatch'myDop'

{}∆Select n.ReplaceBtn
Expand Down
Loading

0 comments on commit 33143be

Please sign in to comment.