@@ -6,7 +6,7 @@ Importing this class will install Cache WEB Terminal properly.</Description>
66<Super >%Projection.AbstractProjection</Super >
77<TimeChanged >63954,74786.153524</TimeChanged >
88<TimeCreated >63890,71053.144208</TimeCreated >
9- <DependsOn >Common,Engine,Router,StaticContent</DependsOn >
9+ <DependsOn >Common,Engine,Router,StaticContent,Autocomplete,Trace </DependsOn >
1010
1111<Parameter name =" DispatchClass" >
1212<Default >WebTerminal.Router</Default >
@@ -70,7 +70,8 @@ This method is invoked when a class is compiled.</Description>
7070<ReturnType >%Status</ReturnType >
7171<Implementation ><![CDATA[
7272 write !, "Installing WebTerminal application to " _ $NAMESPACE
73- set ns = $NAMESPACE // has to be package home namespace!
73+ set ns = $NAMESPACE // ought to be package home namespace!
74+ set ^WebTerminal("HomeNamespace") = ns
7475 zn:ns'="%SYS" "%SYS"
7576 do ##class(Security.System).GetInstallationSecuritySetting(.security)
7677 set cspProperties("AutheEnabled") = 32 // password by default, 64 for no password
@@ -129,6 +130,12 @@ This method is invoked when a class is 'uncompiled'.</Description>
129130<Implementation ><![CDATA[
130131 write !, "Uninstalling WebTerminal application from " _ $NAMESPACE
131132 set ns = $NAMESPACE // has to be package home namespace!
133+ if ($get(^WebTerminal("HomeNamespace")) = "") {
134+ write "Terminal home namespace is not defined! Uninstalling will be skipped."
135+ quit '$$$OK
136+ } else {
137+ set ns = ^WebTerminal("HomeNamespace")
138+ }
132139 zn:ns'="%SYS" "%SYS"
133140 do ..RemoveWebApplication("/terminal")
134141 do ..RemoveWebApplication("/terminalsocket")
0 commit comments