Skip to content

Commit 6a2c989

Browse files
Rubens F. N. da Silvarfns
authored andcommitted
fix usage of instance inside classmethod
1 parent ac05341 commit 6a2c989

File tree

3 files changed

+241
-3
lines changed

3 files changed

+241
-3
lines changed

cls/Port/Project/Backup.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Scan(group, type, created)
8282
}
8383

8484
/// Undo the changes made by the importer copying the __backup__ directory back into the CSP directory.
85-
ClassMethod Rollback() As %Status
85+
Method Rollback() As %Status
8686
{
8787
set sc = $$$OK
8888

port-prod.xml

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,126 @@ Install
927927
Wizard
928928
do ##class(Port.Wizard).Start()
929929
quit
930+
931+
/// This routine demonstrates Caché terminal escape sequences support.
932+
/// Created as standard for Caché WEB Terminal v2
933+
EscapeSequencesDemo
934+
s ESC = $c(27)
935+
s standardAttributes = $lb("Bright", "Dim", "", "Underscore", "Blink", "", "Reverse", "Hidden")
936+
s foregroundColors = $lb("Black", "Red", "Green", "Yellow", "Blue", "Magenta", "Cyan", "White")
937+
s backgroundColors = $lb("Black", "Red", "Green", "Yellow", "Blue", "Magenta", "Cyan", "White")
938+
939+
w #
940+
w "Screen cleared.", !
941+
942+
w !, "Standard attributes:", !
943+
for i=1:1:8 {
944+
if ($lg(standardAttributes, i) = "") continue
945+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(standardAttributes, i), ESC, "[0m", " "
946+
}
947+
948+
w !!, "Foreground colors:", !
949+
for i=30:1:37 {
950+
if ($lg(foregroundColors, i-29) = "") continue
951+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(foregroundColors, i-29), ESC, "[0m", " "
952+
}
953+
954+
w !!, "Background colors:", !
955+
for i=40:1:47 {
956+
if ($lg(backgroundColors, i-39) = "") continue
957+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(backgroundColors, i-39), ESC, "[0m", " "
958+
}
959+
960+
w !!, "Combinations:"
961+
w !, ESC, "[31;1;46;4m", "Bright red underscored text on cyan background", ESC, "[0m", !
962+
w ESC, "[5;34;42;4m", "Blue blinking text on green background", ESC, "[0m", !
963+
964+
d Read
965+
w #
966+
967+
w !!, "Scrolling sequences.", !, "This", !, "Text", !, "Must", !, "Be", !, "Overwritten", !
968+
w ESC, "[18;22r"
969+
970+
for i=0:1:40 {
971+
if (i = 16) w ESC, "[4m"
972+
w "Line --------------- ", i, !
973+
if (i = 16) w ESC, "[0m"
974+
}
975+
976+
w !, "Here display scrolls. Next: \r, scroll 16 up, 1 down."
977+
r null
978+
w $c(13), ESC, "M", ESC, "M", ESC, "M", ESC, "M",
979+
ESC, "M", ESC, "M", ESC, "M", ESC, "M",
980+
ESC, "M", ESC, "M", ESC, "M", ESC, "M",
981+
ESC, "M", ESC, "M", ESC, "M", ESC, "M", ESC, "D"
982+
983+
w "Next: enable scrolling for entire display and clearing the screen."
984+
d Read
985+
w ESC, "[r", #
986+
987+
w !!, "Tab control: clear all tabs, set new tabs.", !!
988+
w ESC, "[3g"
989+
w " -1->", ESC, "H", " ---2--->", ESC, "H", " --------3------->", ESC, "H", " ---4--->", ESC, "H",
990+
" -------5------->", ESC, "H", !
991+
w $c(9), "1", $c(9), "2", $c(9), "3", $c(9), "4", $c(9), "5", !
992+
993+
w "clear tab position 3 ---------->", ESC, "[g", !
994+
w $c(9), "1", $c(9), "2", $c(9), "3", $c(9), "4", $c(9), "5", !
995+
d Read
996+
997+
w !!, "Device status queries:"
998+
w !, "<ESC>[c (Querying device code): ", ESC, "[c"
999+
r temp
1000+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), ";"
1001+
w !, "<ESC>[5n (Querying device status): ", ESC, "[5n"
1002+
r temp
1003+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), "; (<ESC>[0n = OK, <ESC>[3n = FAIL)"
1004+
w !, "<ESC>[6n (Querying cursor position): ", ESC, "[6n"
1005+
r temp
1006+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), ";"
1007+
// it seems that Caché term isn't responding to this requests
1008+
1009+
// does this affects to something?
1010+
w !!, "Resetting device...", ESC, "c"
1011+
d Read
1012+
1013+
// Not effective for Caché term:
1014+
// <ESC>[7l (disable line wrap)
1015+
// <ESC>[7h (enable line wrap)
1016+
1017+
w #, !!, "Cursor control: move (38, 10), draw box."
1018+
w ESC, "[10;38H", "XX", ESC, "[1C", "XX", ESC, "[1B", ESC, "[1D", "X",
1019+
ESC, "[1B", ESC, "[1D", "X", ESC, "[5D", "XXXX", ESC, "[4D", ESC, "[1A", "X"
1020+
// Not effective for Caché term:
1021+
// <ESC>[s (save cursor)
1022+
// <ESC>[u (restore cursor)
1023+
// <ESC>[7 (save cursor with attributes)
1024+
// <ESC>[8 (restore cursor with attributes)
1025+
1026+
w !!, "this text", !!!, "will (except this line) be", !!!,
1027+
"e ", $c(10), "r ", $c(10), "a ", $c(10), "z ", $c(10), "e ",
1028+
$c(10), "d"
1029+
d Read
1030+
1031+
w ESC, "[1A", ESC, "[K" // erase "d" letter (till end of a line)
1032+
w ESC, "[2A", ESC, "[40C", "X", ESC, "[1K" // erase "z" letter (till start of a line)
1033+
w ESC, "[1B", ESC, "[2K" // erase "e" letter (whole line)
1034+
w ESC, "[5A", ESC, "[J" // erase "a", "r", "e" (to bottom)
1035+
w ESC, "[5A", ESC, "[1J" // erase screen to home except one line
1036+
w ESC, "[1;1H", "Erasing whole screen and finishing program."
1037+
d Read
1038+
1039+
w ESC, "[2J", !, "Done."
1040+
1041+
// check printing support (when printer is connected)
1042+
// define key support?
1043+
1044+
q
1045+
1046+
Read()
1047+
w !, "Press ENTER to continue..."
1048+
r null
1049+
q
9301050
9311051
]]></Routine>
9321052

@@ -1042,7 +1162,6 @@ Scan(group, type, created)
10421162
<Method name="Rollback">
10431163
<Description>
10441164
Undo the changes made by the importer copying the __backup__ directory back into the CSP directory.</Description>
1045-
<ClassMethod>1</ClassMethod>
10461165
<ReturnType>%Status</ReturnType>
10471166
<Implementation><![CDATA[
10481167
set sc = $$$OK

port.xml

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,126 @@ Install
927927
Wizard
928928
do ##class(Port.Wizard).Start()
929929
quit
930+
931+
/// This routine demonstrates Caché terminal escape sequences support.
932+
/// Created as standard for Caché WEB Terminal v2
933+
EscapeSequencesDemo
934+
s ESC = $c(27)
935+
s standardAttributes = $lb("Bright", "Dim", "", "Underscore", "Blink", "", "Reverse", "Hidden")
936+
s foregroundColors = $lb("Black", "Red", "Green", "Yellow", "Blue", "Magenta", "Cyan", "White")
937+
s backgroundColors = $lb("Black", "Red", "Green", "Yellow", "Blue", "Magenta", "Cyan", "White")
938+
939+
w #
940+
w "Screen cleared.", !
941+
942+
w !, "Standard attributes:", !
943+
for i=1:1:8 {
944+
if ($lg(standardAttributes, i) = "") continue
945+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(standardAttributes, i), ESC, "[0m", " "
946+
}
947+
948+
w !!, "Foreground colors:", !
949+
for i=30:1:37 {
950+
if ($lg(foregroundColors, i-29) = "") continue
951+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(foregroundColors, i-29), ESC, "[0m", " "
952+
}
953+
954+
w !!, "Background colors:", !
955+
for i=40:1:47 {
956+
if ($lg(backgroundColors, i-39) = "") continue
957+
w "[" , i, "m", ": ", ESC, "[", i, "m", $lg(backgroundColors, i-39), ESC, "[0m", " "
958+
}
959+
960+
w !!, "Combinations:"
961+
w !, ESC, "[31;1;46;4m", "Bright red underscored text on cyan background", ESC, "[0m", !
962+
w ESC, "[5;34;42;4m", "Blue blinking text on green background", ESC, "[0m", !
963+
964+
d Read
965+
w #
966+
967+
w !!, "Scrolling sequences.", !, "This", !, "Text", !, "Must", !, "Be", !, "Overwritten", !
968+
w ESC, "[18;22r"
969+
970+
for i=0:1:40 {
971+
if (i = 16) w ESC, "[4m"
972+
w "Line --------------- ", i, !
973+
if (i = 16) w ESC, "[0m"
974+
}
975+
976+
w !, "Here display scrolls. Next: \r, scroll 16 up, 1 down."
977+
r null
978+
w $c(13), ESC, "M", ESC, "M", ESC, "M", ESC, "M",
979+
ESC, "M", ESC, "M", ESC, "M", ESC, "M",
980+
ESC, "M", ESC, "M", ESC, "M", ESC, "M",
981+
ESC, "M", ESC, "M", ESC, "M", ESC, "M", ESC, "D"
982+
983+
w "Next: enable scrolling for entire display and clearing the screen."
984+
d Read
985+
w ESC, "[r", #
986+
987+
w !!, "Tab control: clear all tabs, set new tabs.", !!
988+
w ESC, "[3g"
989+
w " -1->", ESC, "H", " ---2--->", ESC, "H", " --------3------->", ESC, "H", " ---4--->", ESC, "H",
990+
" -------5------->", ESC, "H", !
991+
w $c(9), "1", $c(9), "2", $c(9), "3", $c(9), "4", $c(9), "5", !
992+
993+
w "clear tab position 3 ---------->", ESC, "[g", !
994+
w $c(9), "1", $c(9), "2", $c(9), "3", $c(9), "4", $c(9), "5", !
995+
d Read
996+
997+
w !!, "Device status queries:"
998+
w !, "<ESC>[c (Querying device code): ", ESC, "[c"
999+
r temp
1000+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), ";"
1001+
w !, "<ESC>[5n (Querying device status): ", ESC, "[5n"
1002+
r temp
1003+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), "; (<ESC>[0n = OK, <ESC>[3n = FAIL)"
1004+
w !, "<ESC>[6n (Querying cursor position): ", ESC, "[6n"
1005+
r temp
1006+
w "RESPONSE: ", $replace(temp, ESC, "<ESC>"), ";"
1007+
// it seems that Caché term isn't responding to this requests
1008+
1009+
// does this affects to something?
1010+
w !!, "Resetting device...", ESC, "c"
1011+
d Read
1012+
1013+
// Not effective for Caché term:
1014+
// <ESC>[7l (disable line wrap)
1015+
// <ESC>[7h (enable line wrap)
1016+
1017+
w #, !!, "Cursor control: move (38, 10), draw box."
1018+
w ESC, "[10;38H", "XX", ESC, "[1C", "XX", ESC, "[1B", ESC, "[1D", "X",
1019+
ESC, "[1B", ESC, "[1D", "X", ESC, "[5D", "XXXX", ESC, "[4D", ESC, "[1A", "X"
1020+
// Not effective for Caché term:
1021+
// <ESC>[s (save cursor)
1022+
// <ESC>[u (restore cursor)
1023+
// <ESC>[7 (save cursor with attributes)
1024+
// <ESC>[8 (restore cursor with attributes)
1025+
1026+
w !!, "this text", !!!, "will (except this line) be", !!!,
1027+
"e ", $c(10), "r ", $c(10), "a ", $c(10), "z ", $c(10), "e ",
1028+
$c(10), "d"
1029+
d Read
1030+
1031+
w ESC, "[1A", ESC, "[K" // erase "d" letter (till end of a line)
1032+
w ESC, "[2A", ESC, "[40C", "X", ESC, "[1K" // erase "z" letter (till start of a line)
1033+
w ESC, "[1B", ESC, "[2K" // erase "e" letter (whole line)
1034+
w ESC, "[5A", ESC, "[J" // erase "a", "r", "e" (to bottom)
1035+
w ESC, "[5A", ESC, "[1J" // erase screen to home except one line
1036+
w ESC, "[1;1H", "Erasing whole screen and finishing program."
1037+
d Read
1038+
1039+
w ESC, "[2J", !, "Done."
1040+
1041+
// check printing support (when printer is connected)
1042+
// define key support?
1043+
1044+
q
1045+
1046+
Read()
1047+
w !, "Press ENTER to continue..."
1048+
r null
1049+
q
9301050
9311051
]]></Routine>
9321052

@@ -1042,7 +1162,6 @@ Scan(group, type, created)
10421162
<Method name="Rollback">
10431163
<Description>
10441164
Undo the changes made by the importer copying the __backup__ directory back into the CSP directory.</Description>
1045-
<ClassMethod>1</ClassMethod>
10461165
<ReturnType>%Status</ReturnType>
10471166
<Implementation><![CDATA[
10481167
set sc = $$$OK

0 commit comments

Comments
 (0)