nss: upgrade to release 3.73
[LibreOffice.git] / wizards / source / scriptforge / SF_Root.xba
blob2af6ca463dcbdc6826ca1cd22805220818d5862c
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="SF_Root" script:language="StarBasic" script:moduleType="normal">REM =======================================================================================================================
4 REM === The ScriptForge library and its associated libraries are part of the LibreOffice project. ===
5 REM === Full documentation is available on https://help.libreoffice.org/ ===
6 REM =======================================================================================================================
8 Option Compatible
9 Option ClassModule
10 Option Private Module
12 Option Explicit
14 &apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;
15 &apos;&apos;&apos; SF_Root
16 &apos;&apos;&apos; =======
17 &apos;&apos;&apos; FOR INTERNAL USE ONLY
18 &apos;&apos;&apos; Singleton class holding all persistent variables shared
19 &apos;&apos;&apos; by all the modules of the ScriptForge library
20 &apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;
22 REM ============================================================= PRIVATE MEMBERS
24 &apos; Internals
25 Private [Me] As Object
26 Private [_Parent] As Object
27 Private ObjectType As String &apos; Must be &quot;ROOT&quot;
28 Private MainFunction As String &apos; Name of method or property called by user script
29 Private MainFunctionArgs As String &apos; Syntax of method called by user script
30 Private StackLevel As Integer &apos; Depth of calls between internal methods
32 &apos; Error management
33 Private ErrorHandler As Boolean &apos; True = error handling active, False = internal debugging
34 Private ConsoleLines() As Variant &apos; Array of messages displayable in console
35 Private ConsoleDialog As Object &apos; SFDialogs.Dialog object
36 Private ConsoleControl As Object &apos; SFDialogs.DialogControl object
37 Private DisplayEnabled As Boolean &apos; When True, display of console or error messages is allowed
38 Private StopWhenError As Boolean &apos; When True, process stops after error &gt; &quot;WARNING&quot;
39 Private DebugMode As Boolean &apos; When True, log enter/exit each official Sub
41 &apos; Services management
42 Private ServicesList As Variant &apos; Dictionary of provided services
44 &apos; Usual UNO services
45 Private FunctionAccess As Object &apos; com.sun.star.sheet.FunctionAccess
46 Private PathSettings As Object &apos; com.sun.star.util.PathSettings
47 Private PathSubstitution As Object &apos; com.sun.star.util.PathSubstitution
48 Private ScriptProvider As Object &apos; com.sun.star.script.provider.MasterScriptProviderFactory
49 Private SystemShellExecute As Object &apos; com.sun.star.system.SystemShellExecute
50 Private CoreReflection As Object &apos; com.sun.star.reflection.CoreReflection
51 Private DispatchHelper As Object &apos; com.sun.star.frame.DispatchHelper
52 Private TextSearch As Object &apos; com.sun.star.util.TextSearch
53 Private SearchOptions As Object &apos; com.sun.star.util.SearchOptions
54 Private Locale As Object &apos; com.sun.star.lang.Locale
55 Private CharacterClass As Object &apos; com.sun.star.i18n.CharacterClassification
56 Private FileAccess As Object &apos; com.sun.star.ucb.SimpleFileAccess
57 Private FilterFactory As Object &apos; com.sun.star.document.FilterFactory
58 Private FolderPicker As Object &apos; com.sun.star.ui.dialogs.FolderPicker
59 Private FilePicker As Object &apos; com.sun.star.ui.dialogs.FilePicker
60 Private URLTransformer As Object &apos; com.sun.star.util.URLTransformer
61 Private Introspection As Object &apos; com.sun.star.beans.Introspection
62 Private BrowseNodeFactory As Object &apos; com.sun.star.script.browse.BrowseNodeFactory
63 Private DatabaseContext As Object &apos; com.sun.star.sdb.DatabaseContext
64 Private ConfigurationProvider _
65 As Object &apos; com.sun.star.configuration.ConfigurationProvider
66 Private MailService As Object &apos; com.sun.star.system.SimpleCommandMail or com.sun.star.system.SimpleSystemMail
68 &apos; Specific persistent services objects or properties
69 Private FileSystemNaming As String &apos; If &quot;SYS&quot;, file and folder naming is based on operating system notation
70 Private PythonHelper As String &apos; File name of Python helper functions (stored in $(inst)/share/Scripts/python)
71 Private Interface As Object &apos; ScriptForge own L10N service
72 Private OSName As String &apos; WIN, LINUX, MACOS
73 Private SFDialogs As Variant &apos; Persistent storage for the SFDialogs library
75 REM ====================================================== CONSTRUCTOR/DESTRUCTOR
77 REM -----------------------------------------------------------------------------
78 Private Sub Class_Initialize()
79 Set [Me] = Nothing
80 Set [_Parent] = Nothing
81 ObjectType = &quot;ROOT&quot;
82 MainFunction = &quot;&quot;
83 MainFunctionArgs = &quot;&quot;
84 StackLevel = 0
85 ErrorHandler = True
86 ConsoleLines = Array()
87 Set ConsoleDialog = Nothing
88 Set ConsoleControl = Nothing
89 DisplayEnabled = True
90 StopWhenError = True
91 DebugMode = False
92 ServicesList = Empty
93 Set FunctionAccess = Nothing
94 Set PathSettings = Nothing
95 Set PathSubstitution = Nothing
96 Set ScriptProvider = Nothing
97 Set SystemShellExecute = Nothing
98 Set CoreReflection = Nothing
99 Set DispatchHelper = Nothing
100 Set TextSearch = Nothing
101 Set SearchOptions = Nothing
102 Set Locale = Nothing
103 Set CharacterClass = Nothing
104 Set FileAccess = Nothing
105 Set FilterFactory = Nothing
106 Set FolderPicker = Nothing
107 Set FilePicker = Nothing
108 Set URLTransformer = Nothing
109 Set Introspection = Nothing
110 FileSystemNaming = &quot;ANY&quot;
111 PythonHelper = &quot;ScriptForgeHelper.py&quot;
112 Set Interface = Nothing
113 Set BrowseNodeFactory = Nothing
114 Set DatabaseContext = Nothing
115 Set ConfigurationProvider = Nothing
116 Set MailService = Nothing
117 OSName = &quot;&quot;
118 SFDialogs = Empty
119 End Sub &apos; ScriptForge.SF_Root Constructor
121 REM -----------------------------------------------------------------------------
122 Private Sub Class_Terminate()
123 Call Class_Initialize()
124 End Sub &apos; ScriptForge.SF_Root Destructor
126 REM -----------------------------------------------------------------------------
127 Public Function Dispose() As Variant
128 Call Class_Terminate()
129 Set Dispose = Nothing
130 End Function &apos; ScriptForge.SF_Root Explicit destructor
132 REM =========================================================== PRIVATE FUNCTIONS
134 REM -----------------------------------------------------------------------------
135 Public Sub _AddToConsole(ByVal psLine As String)
136 &apos;&apos;&apos; Add a new line to the console
137 &apos;&apos;&apos; TAB characters are expanded before the insertion of the line
138 &apos;&apos;&apos; NB: Array redimensioning of a member of an object must be done in the class module
139 &apos;&apos;&apos; Args:
140 &apos;&apos;&apos; psLine: the line to add
142 Dim lConsole As Long &apos; UBound of ConsoleLines
143 Dim sLine As String &apos; Alias of psLine
145 &apos; Resize ConsoleLines
146 lConsole = UBound(ConsoleLines)
147 If lConsole &lt; 0 Then
148 ReDim ConsoleLines(0)
149 Else
150 ReDim Preserve ConsoleLines(0 To lConsole + 1)
151 End If
153 &apos; Add a timestamp to the line and insert it (without date)
154 sLine = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
155 ConsoleLines(lConsole + 1) = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
157 &apos; Add the new line to the actual (probably non-modal) console, if active
158 If Not IsNull(ConsoleDialog) Then
159 If ConsoleDialog._IsStillAlive(False) Then &apos; False to not raise an error
160 If IsNull(ConsoleControl) Then Set ConsoleControl = ConsoleDialog.Controls(SF_Exception.CONSOLENAME) &apos; Should not happen ...
161 ConsoleControl.WriteLine(sLine)
162 End If
163 End If
165 End Sub &apos; ScriptForge.SF_Root._AddToConsole
167 REM -----------------------------------------------------------------------------
168 Public Sub _LoadLocalizedInterface(Optional ByVal psMode As String)
169 &apos;&apos;&apos; Build the user interface in a persistent L10N object
170 &apos;&apos;&apos; Executed - only once - at first ScriptForge invocation by a user script
171 &apos;&apos;&apos; Args:
172 &apos;&apos;&apos; psMode: ADDTEXT =&gt; the (english) labels are loaded from code below
173 &apos;&apos;&apos; POFILE =&gt; the localized labels are loaded from a PO file
174 &apos;&apos;&apos; the name of the file is &quot;la.po&quot; where la = language part of locale
175 &apos;&apos;&apos; (fallback to ADDTEXT mode if file does not exist)
177 Dim sInstallFolder As String &apos; ScriptForge installation directory
178 Dim sPOFolder As String &apos; Folder containing the PO files
179 Dim sPOFile As String &apos; PO File to load
180 Dim sLocale As String &apos; Locale
182 If ErrorHandler Then On Local Error GoTo Catch
184 Try:
185 &apos;TODO: Modify default value
186 If IsMissing(psMode) Then psMode = &quot;POFILE&quot;
188 If psMode = &quot;POFILE&quot; Then &apos; Use this mode in production
189 &apos; Build the po file name
190 With SF_FileSystem
191 sInstallFolder = ._SFInstallFolder() &apos; ScriptForge installation folder
192 sLocale = SF_Utils._GetUNOService(&quot;Locale&quot;).Language
193 sPOFolder = .BuildPath(sInstallFolder, &quot;po&quot;)
194 sPOFile = .BuildPath(sPOFolder, sLocale &amp; &quot;.po&quot;)
195 If Not .FileExists(sPOFile) Then &apos; File not found =&gt; load texts from code below
196 psMode = &quot;ADDTEXT&quot;
197 Else
198 Set Interface = CreateScriptService(&quot;L10N&quot;, sPOFolder, sLocale)
199 End If
200 End With
201 End If
203 If psMode = &quot;ADDTEXT&quot; Then &apos; Use this mode in development to prepare a new POT file
204 Set Interface = CreateScriptService(&quot;L10N&quot;)
205 With Interface
206 &apos; SF_Exception.Raise
207 .AddText( Context := &quot;CLOSEBUTTON&quot; _
208 , MsgId := &quot;Close&quot; _
209 , Comment := &quot;Text in close buttons of progress and console dialog boxes&quot; _
211 .AddText( Context := &quot;ERRORNUMBER&quot; _
212 , MsgId := &quot;Error %1&quot; _
213 , Comment := &quot;Title in error message box\n&quot; _
214 &amp; &quot;%1: an error number&quot; _
216 .AddText( Context := &quot;ERRORLOCATION&quot; _
217 , MsgId := &quot;Location : %1&quot; _
218 , Comment := &quot;Error message box\n&quot; _
219 &amp; &quot;%1: a line number&quot; _
221 .AddText( Context := &quot;LONGERRORDESC&quot; _
222 , MsgId := &quot;Error %1 - Location = %2 - Description = %3&quot; _
223 , Comment := &quot;Logfile record&quot; _
225 .AddText( Context := &quot;STOPEXECUTION&quot; _
226 , MsgId := &quot;THE EXECUTION IS CANCELLED.&quot; _
227 , Comment := &quot;SF_Utils._Validate error message&quot; _
229 &apos; SF_Exception.RaiseAbort
230 .AddText( Context := &quot;INTERNALERROR&quot; _
231 , MsgId := &quot;The ScriptForge library has crashed. The reason is unknown.\n&quot; _
232 &amp; &quot;Maybe a bug that could be reported on\n&quot; _
233 &amp; &quot;\thttps://bugs.documentfoundation.org/\n\n&quot; _
234 &amp; &quot;More details : \n\n&quot; _
235 , Comment := &quot;SF_Exception.RaiseAbort error message&quot; _
237 &apos; SF_Utils._Validate
238 .AddText( Context := &quot;VALIDATESOURCE&quot; _
239 , MsgId := &quot;Library : \t%1\nService : \t%2\nMethod : \t%3&quot; _
240 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
241 &amp; &quot;%1: probably ScriptForge\n&quot; _
242 &amp; &quot;%2: service or module name\n&quot; _
243 &amp; &quot;%3: property or method name where the error occurred&quot; _
245 .AddText( Context := &quot;VALIDATEARGS&quot; _
246 , MsgId := &quot;Arguments: %1&quot; _
247 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
248 &amp; &quot;%1: list of arguments of the method&quot; _
250 .AddText( Context := &quot;VALIDATEERROR&quot; _
251 , MsgId := &quot;A serious error has been detected in your code on argument : « %1 ».&quot; _
252 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
253 &amp; &quot;%1: Wrong argument name&quot; _
255 .AddText( Context := &quot;VALIDATIONRULES&quot; _
256 , MsgId := &quot;\tValidation rules :&quot;, Comment := &quot;SF_Utils.Validate error message&quot; _
258 .AddText( Context := &quot;VALIDATETYPES&quot; _
259 , MsgId := &quot;\t\t« %1 » must have next type (or one of next types) : %2&quot; _
260 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
261 &amp; &quot;%1: Wrong argument name\n&quot; _
262 &amp; &quot;%2: Comma separated list of allowed types&quot; _
264 .AddText( Context := &quot;VALIDATEVALUES&quot; _
265 , MsgId := &quot;\t\t« %1 » must contain one of next values : %2&quot; _
266 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
267 &amp; &quot;%1: Wrong argument name\n&quot; _
268 &amp; &quot;%2: Comma separated list of allowed values&quot; _
270 .AddText( Context := &quot;VALIDATEREGEX&quot; _
271 , MsgId := &quot;\t\t« %1 » must match next regular expression : %2&quot; _
272 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
273 &amp; &quot;%1: Wrong argument name\n&quot; _
274 &amp; &quot;%2: A regular expression&quot; _
276 .AddText( Context := &quot;VALIDATECLASS&quot; _
277 , MsgId := &quot;\t\t« %1 » must be a Basic object of class : %2&quot; _
278 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
279 &amp; &quot;%1: Wrong argument name\n&quot; _
280 &amp; &quot;%2: The name of a Basic class&quot; _
282 .AddText( Context := &quot;VALIDATEACTUAL&quot; _
283 , MsgId := &quot;The actual value of « %1 » is : &apos;%2&apos;&quot; _
284 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
285 &amp; &quot;%1: Wrong argument name\n&quot; _
286 &amp; &quot;%2: The value of the argument as a string&quot; _
288 .AddText( Context := &quot;VALIDATEMISSING&quot; _
289 , MsgId := &quot;The « %1 » argument is mandatory, yet it is missing.&quot; _
290 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
291 &amp; &quot;%1: Wrong argument name&quot; _
293 &apos; SF_Utils._ValidateArray
294 .AddText( Context := &quot;VALIDATEARRAY&quot; _
295 , MsgId := &quot;\t\t« %1 » must be an array.&quot; _
296 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
297 &amp; &quot;%1: Wrong argument name&quot; _
299 .AddText( Context := &quot;VALIDATEDIMS&quot; _
300 , MsgId := &quot;\t\t« %1 » must have exactly %2 dimension(s).&quot; _
301 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
302 &amp; &quot;%1: Wrong argument name\n&quot; _
303 &amp; &quot;%2: Number of dimensions of the array&quot; _
305 .AddText( Context := &quot;VALIDATEALLTYPES&quot; _
306 , MsgId := &quot;\t\t« %1 » must have all elements of the same type : %2&quot; _
307 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
308 &amp; &quot;%1: Wrong argument name\n&quot; _
309 &amp; &quot;%2: Either one single type or &apos;String, Date, Numeric&apos;&quot; _
311 .AddText( Context := &quot;VALIDATENOTNULL&quot; _
312 , MsgId := &quot;\t\t« %1 » must not contain any NULL or EMPTY elements.&quot; _
313 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
314 &amp; &quot;%1: Wrong argument name\n&quot; _
315 &amp; &quot;NULL and EMPTY should not be translated&quot; _
317 &apos; SF_Utils._ValidateFile
318 .AddText( Context := &quot;VALIDATEFILE&quot; _
319 , MsgId := &quot;\t\t« %1 » must be of type String.&quot; _
320 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
321 &amp; &quot;%1: Wrong argument name\n&quot; _
322 &amp; &quot;&apos;String&apos; should not be translated&quot; _
324 .AddText( Context := &quot;VALIDATEFILESYS&quot; _
325 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the operating system native notation.&quot; _
326 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
327 &amp; &quot;%1: Wrong argument name&quot; _
329 .AddText( Context := &quot;VALIDATEFILEURL&quot; _
330 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the portable URL notation.&quot; _
331 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
332 &amp; &quot;%1: Wrong argument name\n&quot; _
333 &amp; &quot;&apos;URL&apos; should not be translated&quot; _
335 .AddText( Context := &quot;VALIDATEFILEANY&quot; _
336 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name.&quot; _
337 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
338 &amp; &quot;%1: Wrong argument name&quot; _
340 .AddText( Context := &quot;VALIDATEWILDCARD&quot; _
341 , MsgId := &quot;\t\t« %1 » may contain one or more wildcard characters (?, *) in its last path component only.&quot; _
342 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
343 &amp; &quot;%1: Wrong argument name\n&quot; _
344 &amp; &quot;&apos;(?, *)&apos; is to be left as is&quot; _
346 &apos; SF_Array.RangeInit
347 .AddText( Context := &quot;ARRAYSEQUENCE&quot; _
348 , MsgId := &quot;The respective values of &apos;From&apos;, &apos;UpTo&apos; and &apos;ByStep&apos; are incoherent.\n\n&quot; _
349 &amp; &quot;\t« From » = %1\n&quot; _
350 &amp; &quot;\t« UpTo » = %2\n&quot; _
351 &amp; &quot;\t« ByStep » = %3&quot; _
352 , Comment := &quot;SF_Array.RangeInit error message\n&quot; _
353 &amp; &quot;%1, %2, %3: Numeric values\n&quot; _
354 &amp; &quot;&apos;From&apos;, &apos;UpTo&apos;, &apos;ByStep&apos; should not be translated&quot; _
356 &apos; SF_Array.AppendColumn, AppendRow, PrependColumn, PrependRow
357 .AddText( Context := &quot;ARRAYINSERT&quot; _
358 , MsgId := &quot;The array and the vector to insert have incompatible sizes.\n\n&quot; _
359 &amp; &quot;\t« Array_2D » = %2\n&quot; _
360 &amp; &quot;\t« %1 » = %3&quot; _
361 , Comment := &quot;SF_Array.AppendColumn (...) error message\n&quot; _
362 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
363 &amp; &quot;%2, %3: array contents\n&quot; _
364 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
366 &apos; SF_Array.ExtractColumn, ExtractRow
367 .AddText( Context := &quot;ARRAYINDEX1&quot; _
368 , MsgId := &quot;The given index does not fit within the bounds of the array.\n\n&quot; _
369 &amp; &quot;\t« Array_2D » = %2\n&quot; _
370 &amp; &quot;\t« %1 » = %3&quot; _
371 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
372 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
373 &amp; &quot;%2, %3: array contents\n&quot; _
374 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
376 &apos; SF_Array.ExtractColumn, ExtractRow
377 .AddText( Context := &quot;ARRAYINDEX2&quot; _
378 , MsgId := &quot;The given slice limits do not fit within the bounds of the array.\n\n&quot; _
379 &amp; &quot;\t« Array_2D » = %1\n&quot; _
380 &amp; &quot;\t« From » = %2\n&quot; _
381 &amp; &quot;\t« UpTo » = %3&quot; _
382 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
383 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
384 &amp; &quot;%2, %3: array contents\n&quot; _
385 &amp; &quot;&apos;Array_2D&apos;, &apos;From&apos; and &apos;UpTo&apos; should not be translated&quot; _
387 &apos; SF_Array.ImportFromCSVFile
388 .AddText( Context := &quot;CSVPARSING&quot; _
389 , MsgId := &quot;The given file could not be parsed as a valid CSV file.\n\n&quot; _
390 &amp; &quot;\t« File name » = %1\n&quot; _
391 &amp; &quot;\tLine number = %2\n&quot; _
392 &amp; &quot;\tContent = %3&quot; _
393 , Comment := &quot;SF_Array.ImportFromCSVFile error message\n&quot; _
394 &amp; &quot;%1: a file name\n&quot; _
395 &amp; &quot;%2: numeric\n&quot; _
396 &amp; &quot;%3: a long string&quot; _
398 &apos; SF_Dictionary.Add/ReplaceKey
399 .AddText( Context := &quot;DUPLICATEKEY&quot; _
400 , MsgId := &quot;The insertion of a new key &quot; _
401 &amp; &quot;into a dictionary failed because the key already exists.\n&quot; _
402 &amp; &quot;Note that the comparison between keys is NOT case-sensitive.\n\n&quot; _
403 &amp; &quot;« %1 » = %2&quot; _
404 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
405 &amp; &quot;%1: An identifier&quot; _
406 &amp; &quot;%2: a (potentially long) string&quot; _
408 &apos; SF_Dictionary.Remove/ReplaceKey/ReplaceItem
409 .AddText( Context := &quot;UNKNOWNKEY&quot; _
410 , MsgId := &quot;The requested key does not exist in the dictionary.\n\n&quot; _
411 &amp; &quot;« %1 » = %2&quot; _
412 , Comment := &quot;SF_Dictionary Remove/ReplaceKey/ReplaceItem error message\n&quot; _
413 &amp; &quot;%1: An identifier&quot; _
414 &amp; &quot;%2: a (potentially long) string&quot; _
416 &apos; SF_Dictionary.Add/ReplaceKey
417 .AddText( Context := &quot;INVALIDKEY&quot; _
418 , MsgId := &quot;The insertion or the update of an entry &quot; _
419 &amp; &quot;into a dictionary failed because the given key contains only spaces.&quot; _
420 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
422 &apos; SF_FileSystem.CopyFile/MoveFile/DeleteFile/CreateScriptService(&quot;L10N&quot;)
423 .AddText( Context := &quot;UNKNOWNFILE&quot; _
424 , MsgId := &quot;The given file could not be found on your system.\n\n&quot; _
425 &amp; &quot;« %1 » = %2&quot; _
426 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
427 &amp; &quot;%1: An identifier\n&quot; _
428 &amp; &quot;%2: A file name&quot; _
430 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
431 .AddText( Context := &quot;UNKNOWNFOLDER&quot; _
432 , MsgId := &quot;The given folder could not be found on your system.\n\n&quot; _
433 &amp; &quot;« %1 » = %2&quot; _
434 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
435 &amp; &quot;%1: An identifier\n&quot; _
436 &amp; &quot;%2: A folder name&quot; _
438 &apos; SF_FileSystem.CopyFile/MoveFolder/DeleteFile
439 .AddText( Context := &quot;NOTAFILE&quot; _
440 , MsgId := &quot;« %1 » contains the name of an existing folder, not that of a file.\n\n&quot; _
441 &amp; &quot;« %1 » = %2&quot; _
442 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
443 &amp; &quot;%1: An identifier\n&quot; _
444 &amp; &quot;%2: A file name&quot; _
446 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
447 .AddText( Context := &quot;NOTAFOLDER&quot; _
448 , MsgId := &quot;« %1 » contains the name of an existing file, not that of a folder.\n\n&quot; _
449 &amp; &quot;« %1 » = %2&quot; _
450 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
451 &amp; &quot;%1: An identifier\n&quot; _
452 &amp; &quot;%2: A folder name&quot; _
454 &apos; SF_FileSystem.Copy+Move/File+Folder/CreateTextFile/OpenTextFile
455 .AddText( Context := &quot;OVERWRITE&quot; _
456 , MsgId := &quot;You tried to create a new file which already exists. Overwriting it has been rejected.\n\n&quot; _
457 &amp; &quot;« %1 » = %2&quot; _
458 , Comment := &quot;SF_FileSystem copy/move/... error message\n&quot; _
459 &amp; &quot;%1: An identifier\n&quot; _
460 &amp; &quot;%2: A file name&quot; _
462 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
463 .AddText( Context := &quot;READONLY&quot; _
464 , MsgId := &quot;Copying or moving a file to a destination which has its read-only attribute set, or deleting such a file or folder is forbidden.\n\n&quot; _
465 &amp; &quot;« %1 » = %2&quot; _
466 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
467 &amp; &quot;%1: An identifier\n&quot; _
468 &amp; &quot;%2: A file name&quot; _
470 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
471 .AddText( Context := &quot;NOFILEMATCH&quot; _
472 , MsgId := &quot;When « %1 » contains wildcards. at least one file or folder must match the given filter. Otherwise the operation is rejected.\n\n&quot; _
473 &amp; &quot;« %1 » = %2&quot; _
474 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
475 &amp; &quot;%1: An identifier\n&quot; _
476 &amp; &quot;%2: A file or folder name with wildcards&quot; _
478 &apos; SF_FileSystem.CreateFolder
479 .AddText( Context := &quot;FOLDERCREATION&quot; _
480 , MsgId := &quot;« %1 » contains the name of an existing file or an existing folder. The operation is rejected.\n\n&quot; _
481 &amp; &quot;« %1 » = %2&quot; _
482 , Comment := &quot;SF_FileSystem CreateFolder error message\n&quot; _
483 &amp; &quot;%1: An identifier\n&quot; _
484 &amp; &quot;%2: A file or folder name&quot; _
486 &apos; SF_Services.CreateScriptService
487 .AddText( Context := &quot;UNKNOWNSERVICE&quot; _
488 , MsgId := &quot;No service named &apos;%4&apos; has been registered for the library &apos;%3&apos;.\n\n&quot; _
489 &amp; &quot;« %1 » = %2&quot; _
490 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
491 &amp; &quot;%1: An identifier\n&quot; _
492 &amp; &quot;%2: A string\n&quot; _
493 &amp; &quot;%3: A Basic library name\n&quot; _
494 &amp; &quot;%4: A service (1 word) name&quot; _
496 &apos; SF_Services.CreateScriptService
497 .AddText( Context := &quot;SERVICESNOTLOADED&quot; _
498 , MsgId := &quot;The library &apos;%3&apos; and its services could not been loaded.\n&quot; _
499 &amp; &quot;The reason is unknown.\n&quot; _
500 &amp; &quot;However, checking the &apos;%3.SF_Services.RegisterScriptServices()&apos; function and its return value can be a good starting point.\n\n&quot; _
501 &amp; &quot;« %1 » = %2&quot; _
502 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
503 &amp; &quot;%1: An identifier\n&quot; _
504 &amp; &quot;%2: A string\n&quot; _
505 &amp; &quot;%3: A Basic library name&quot; _
507 &apos; SF_Session.ExecuteCalcFunction
508 .AddText( Context := &quot;CALCFUNC&quot; _
509 , MsgId := &quot;The Calc &apos;%1&apos; function encountered an error. Either the given function does not exist or its arguments are invalid.&quot; _
510 , Comment := &quot;SF_Session.ExecuteCalcFunction error message\n&quot; _
511 &amp; &quot;&apos;Calc&apos; should not be translated&quot; _
513 &apos; SF_Session._GetScript
514 .AddText( Context := &quot;NOSCRIPT&quot; _
515 , MsgId := &quot;The requested %1 script could not be located in the given libraries and modules.\n&quot; _
516 &amp; &quot;« %2 » = %3\n&quot; _
517 &amp; &quot;« %4 » = %5&quot; _
518 , Comment := &quot;SF_Session._GetScript error message\n&quot; _
519 &amp; &quot;%1: &apos;Basic&apos; or &apos;Python&apos;\n&quot; _
520 &amp; &quot;%2: An identifier\n&quot; _
521 &amp; &quot;%3: A string\n&quot; _
522 &amp; &quot;%2: An identifier\n&quot; _
523 &amp; &quot;%3: A string&quot; _
525 &apos; SF_Session.ExecuteBasicScript
526 .AddText( Context := &quot;SCRIPTEXEC&quot; _
527 , MsgId := &quot;An exception occurred during the execution of the Basic script.\n&quot; _
528 &amp; &quot;Cause: %3\n&quot; _
529 &amp; &quot;« %1 » = %2&quot; _
530 , Comment := &quot;SF_Session.ExecuteBasicScript error message\n&quot; _
531 &amp; &quot;%1: An identifier\n&quot; _
532 &amp; &quot;%2: A string\n&quot; _
533 &amp; &quot;%3: A (long) string&quot; _
535 &apos; SF_Session.SendMail
536 .AddText( Context := &quot;WRONGEMAIL&quot; _
537 , MsgId := &quot;One of the email addresses has been found invalid.\n&quot; _
538 &amp; &quot;Invalid mail = « %1 »&quot; _
539 , Comment := &quot;SF_Session.SendMail error message\n&quot; _
540 &amp; &quot;%1 = a mail address&quot; _
542 &apos; SF_Session.SendMail
543 .AddText( Context := &quot;SENDMAIL&quot; _
544 , MsgId := &quot;The message could not be sent due to a system error.\n&quot; _
545 &amp; &quot;A possible cause is that LibreOffice could not find any mail client.&quot; _
546 , Comment := &quot;SF_Session.SendMail error message&quot; _
548 &apos; SF_TextStream._IsFileOpen
549 .AddText( Context := &quot;FILENOTOPEN&quot; _
550 , MsgId := &quot;The requested file operation could not be executed because the file was closed previously.\n\n&quot; _
551 &amp; &quot;File name = &apos;%1&apos;&quot; _
552 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
553 &amp; &quot;%1: A file name&quot; _
555 &apos; SF_TextStream._IsFileOpen
556 .AddText( Context := &quot;FILEOPENMODE&quot; _
557 , MsgId := &quot;The requested file operation could not be executed because it is incompatible with the mode in which the file was opened.\n\n&quot; _
558 &amp; &quot;File name = &apos;%1&apos;\n&quot; _
559 &amp; &quot;Open mode = %2&quot; _
560 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
561 &amp; &quot;%1: A file name\n&quot; _
562 &amp; &quot;%2: READ, WRITE or APPEND&quot; _
564 &apos; SF_UI.Document
565 .AddText( Context := &quot;DOCUMENT&quot; _
566 , MsgId := &quot;The requested document could not be found.\n\n&quot; _
567 &amp; &quot;%1 = &apos;%2&apos;&quot; _
568 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
569 &amp; &quot;%1: An identifier\n&quot; _
570 &amp; &quot;%2: A string&quot; _
572 &apos; SF_UI.Create
573 .AddText( Context := &quot;DOCUMENTCREATION&quot; _
574 , MsgId := &quot;The creation of a new document failed.\n&quot; _
575 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
576 &amp; &quot;Either the document type is unknown, or no template file was given,\n&quot; _
577 &amp; &quot;or the given template file was not found on your system.\n\n&quot; _
578 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
579 &amp; &quot;%3 = &apos;%4&apos;&quot; _
580 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
581 &amp; &quot;%1: An identifier\n&quot; _
582 &amp; &quot;%2: A string\n&quot; _
583 &amp; &quot;%3: An identifier\n&quot; _
584 &amp; &quot;%4: A string&quot; _
586 &apos; SF_UI.OpenDocument
587 .AddText( Context := &quot;DOCUMENTOPEN&quot; _
588 , MsgId := &quot;The opening of the document failed.\n&quot; _
589 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
590 &amp; &quot;Either the file does not exist, or the password is wrong, or the given filter is invalid.\n\n&quot; _
591 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
592 &amp; &quot;%3 = &apos;%4&apos;\n&quot; _
593 &amp; &quot;%5 = &apos;%6&apos;&quot; _
594 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
595 &amp; &quot;%1: An identifier\n&quot; _
596 &amp; &quot;%2: A string\n&quot; _
597 &amp; &quot;%3: An identifier\n&quot; _
598 &amp; &quot;%4: A string\n&quot; _
599 &amp; &quot;%5: An identifier\n&quot; _
600 &amp; &quot;%6: A string&quot; _
602 &apos; SF_UI.OpenBaseDocument
603 .AddText( Context := &quot;BASEDOCUMENTOPEN&quot; _
604 , MsgId := &quot;The opening of the Base document failed.\n&quot; _
605 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
606 &amp; &quot;Either the file does not exist, or the file is not registered under the given name.\n\n&quot; _
607 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
608 &amp; &quot;%3 = &apos;%4&apos;&quot; _
609 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
610 &amp; &quot;%1: An identifier\n&quot; _
611 &amp; &quot;%2: A string\n&quot; _
612 &amp; &quot;%3: An identifier\n&quot; _
613 &amp; &quot;%4: A string&quot; _
615 &apos; SF_Document._IsStillAlive
616 .AddText( Context := &quot;DOCUMENTDEAD&quot; _
617 , MsgId := &quot;The requested action could not be executed because the document was closed inadvertently.\n\n&quot; _
618 &amp; &quot;The concerned document is &apos;%1&apos;&quot; _
619 , Comment := &quot;SF_Document._IsStillAlive error message\n&quot; _
620 &amp; &quot;%1: A file name&quot; _
622 &apos; SF_Document.Save
623 .AddText( Context := &quot;DOCUMENTSAVE&quot; _
624 , MsgId := &quot;The document could not be saved.\n&quot; _
625 &amp; &quot;Either the document has been opened read-only, or the destination file has a read-only attribute set, &quot; _
626 &amp; &quot;or the file where to save to is undefined.\n\n&quot; _
627 &amp; &quot;%1 = &apos;%2&apos;&quot; _
628 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
629 &amp; &quot;%1: An identifier\n&quot; _
630 &amp; &quot;%2: A file name\n&quot; _
632 &apos; SF_Document.SaveAs
633 .AddText( Context := &quot;DOCUMENTSAVEAS&quot; _
634 , MsgId := &quot;The document could not be saved.\n&quot; _
635 &amp; &quot;Either the document must not be overwritten, or the destination file has a read-only attribute set, &quot; _
636 &amp; &quot;or the given filter is invalid.\n\n&quot; _
637 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
638 &amp; &quot;%3 = %4\n&quot; _
639 &amp; &quot;%5 = &apos;%6&apos;&quot; _
640 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
641 &amp; &quot;%1: An identifier\n&quot; _
642 &amp; &quot;%2: A file name\n&quot; _
643 &amp; &quot;%3: An identifier\n&quot; _
644 &amp; &quot;%4: True or False\n&quot; _
645 &amp; &quot;%5: An identifier\n&quot; _
646 &amp; &quot;%6: A string&quot; _
648 &apos; SF_Document.any update
649 .AddText( Context := &quot;DOCUMENTREADONLY&quot; _
650 , MsgId := &quot;You tried to edit a document which is not modifiable. The document has not been changed.\n\n&quot; _
651 &amp; &quot;« %1 » = %2&quot; _
652 , Comment := &quot;SF_Document any update\n&quot; _
653 &amp; &quot;%1: An identifier\n&quot; _
654 &amp; &quot;%2: A file name&quot; _
656 &apos; SF_Base.GetDatabase
657 .AddText( Context := &quot;DBCONNECT&quot; _
658 , MsgId := &quot;The database related to the actual Base document could not be retrieved.\n&quot; _
659 &amp; &quot;Check the connection/login parameters.\n\n&quot; _
660 &amp; &quot;« %1 » = &apos;%2&apos;\n&quot; _
661 &amp; &quot;« %3 » = &apos;%4&apos;\n&quot; _
662 &amp; &quot;« Document » = %5&quot; _
663 , Comment := &quot;SF_Base GetDatabase\n&quot; _
664 &amp; &quot;%1: An identifier\n&quot; _
665 &amp; &quot;%2: A user name\n&quot; _
666 &amp; &quot;%3: An identifier\n&quot; _
667 &amp; &quot;%4: A password\n&quot; _
668 &amp; &quot;%5: A file name&quot; _
670 &apos; SF_Calc._ParseAddress (sheet)
671 .AddText( Context := &quot;CALCADDRESS1&quot; _
672 , MsgId := &quot;The given address does not correspond with a valid sheet name.\n\n&quot; _
673 &amp; &quot;« %1 » = %2\n&quot; _
674 &amp; &quot;« %3 » = %4&quot; _
675 , Comment := &quot;SF_Calc _ParseAddress (sheet)\n&quot; _
676 &amp; &quot;%1: An identifier\n&quot; _
677 &amp; &quot;%2: A string\n&quot; _
678 &amp; &quot;%3: An identifier\n&quot; _
679 &amp; &quot;%4: A file name&quot; _
681 &apos; SF_Calc._ParseAddress (range)
682 .AddText( Context := &quot;CALCADDRESS2&quot; _
683 , MsgId := &quot;The given address does not correspond with a valid range of cells.\n\n&quot; _
684 &amp; &quot;« %1 » = %2\n&quot; _
685 &amp; &quot;« %3 » = %4&quot; _
686 , Comment := &quot;SF_Calc _ParseAddress (range)\n&quot; _
687 &amp; &quot;%1: An identifier\n&quot; _
688 &amp; &quot;%2: A string\n&quot; _
689 &amp; &quot;%3: An identifier\n&quot; _
690 &amp; &quot;%4: A file name&quot; _
692 &apos; SF_Calc.InsertSheet
693 .AddText( Context := &quot;DUPLICATESHEET&quot; _
694 , MsgId := &quot;There exists already in the document a sheet with the same name.\n\n&quot; _
695 &amp; &quot;« %1 » = %2\n&quot; _
696 &amp; &quot;« %3 » = %4&quot; _
697 , Comment := &quot;SF_Calc InsertSheet\n&quot; _
698 &amp; &quot;%1: An identifier\n&quot; _
699 &amp; &quot;%2: A string\n&quot; _
700 &amp; &quot;%3: An identifier\n&quot; _
701 &amp; &quot;%4: A file name&quot; _
703 &apos; SF_Calc.Offset
704 .AddText( Context := &quot;OFFSETADDRESS&quot; _
705 , MsgId := &quot;The computed range falls beyond the sheet boundaries or is meaningless.\n\n&quot; _
706 &amp; &quot;« %1 » = %2\n&quot; _
707 &amp; &quot;« %3 » = %4\n&quot; _
708 &amp; &quot;« %5 » = %6\n&quot; _
709 &amp; &quot;« %7 » = %8\n&quot; _
710 &amp; &quot;« %9 » = %10\n&quot; _
711 &amp; &quot;« %11 » = %12&quot; _
712 , Comment := &quot;SF_Calc Offset\n&quot; _
713 &amp; &quot;%1: An identifier\n&quot; _
714 &amp; &quot;%2: A Calc reference\n&quot; _
715 &amp; &quot;%3: An identifier\n&quot; _
716 &amp; &quot;%4: A number\n&quot; _
717 &amp; &quot;%5: An identifier\n&quot; _
718 &amp; &quot;%6: A number\n&quot; _
719 &amp; &quot;%7: An identifier\n&quot; _
720 &amp; &quot;%8: A number\n&quot; _
721 &amp; &quot;%9: An identifier\n&quot; _
722 &amp; &quot;%10: A number\n&quot; _
723 &amp; &quot;%11: An identifier\n&quot; _
724 &amp; &quot;%12: A file name&quot; _
726 &apos; SF_Dialog._NewDialog
727 .AddText( Context := &quot;DIALOGNOTFOUND&quot; _
728 , MsgId := &quot;The requested dialog could not be located in the given container or library.\n&quot; _
729 &amp; &quot;« %1 » = %2\n&quot; _
730 &amp; &quot;« %3 » = %4\n&quot; _
731 &amp; &quot;« %5 » = %6\n&quot; _
732 &amp; &quot;« %7 » = %8&quot; _
733 , Comment := &quot;SF_Dialog creation\n&quot; _
734 &amp; &quot;%1: An identifier\n&quot; _
735 &amp; &quot;%2: A string\n&quot; _
736 &amp; &quot;%3: An identifier\n&quot; _
737 &amp; &quot;%4: A file name\n&quot; _
738 &amp; &quot;%5: An identifier\n&quot; _
739 &amp; &quot;%6: A string\n&quot; _
740 &amp; &quot;%7: An identifier\n&quot; _
741 &amp; &quot;%8: A string&quot; _
743 &apos; SF_Dialog._IsStillAlive
744 .AddText( Context := &quot;DIALOGDEAD&quot; _
745 , MsgId := &quot;The requested action could not be executed because the dialog was closed inadvertently.\n\n&quot; _
746 &amp; &quot;The concerned dialog is &apos;%1&apos;.&quot; _
747 , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
748 &amp; &quot;%1: An identifier&quot; _
750 &apos; SF_DialogControl._SetProperty
751 .AddText( Context := &quot;CONTROLTYPE&quot; _
752 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
753 &amp; &quot;The property &apos;%4&apos; is not applicable on that type of dialog controls.&quot; _
754 , Comment := &quot;SF_DialogControl property setting\n&quot; _
755 &amp; &quot;%1: An identifier\n&quot; _
756 &amp; &quot;%2: An identifier\n&quot; _
757 &amp; &quot;%3: A string\n&quot; _
758 &amp; &quot;%4: An identifier&quot; _
760 &apos; SF_DialogControl.WriteLine
761 .AddText( Context := &quot;TEXTFIELD&quot; _
762 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is not a multiline text field.\n&quot; _
763 &amp; &quot;The requested method could not be executed.&quot; _
764 , Comment := &quot;SF_DialogControl add line in textbox\n&quot; _
765 &amp; &quot;%1: An identifier\n&quot; _
766 &amp; &quot;%2: An identifier&quot; _
768 &apos; SF_Database.RunSql
769 .AddText( Context := &quot;DBREADONLY&quot; _
770 , MsgId := &quot;The database has been opened in read-only mode.\n&quot; _
771 &amp; &quot;The &apos;%1&apos; method must not be executed in this context.&quot; _
772 , Comment := &quot;SF_Database when running update SQL statement\n&quot; _
773 &amp; &quot;%1: The concerned method&quot; _
775 &apos; SF_Database._ExecuteSql
776 .AddText( Context := &quot;SQLSYNTAX&quot; _
777 , MsgId := &quot;An SQL statement could not be interpreted or executed by the database system.\n&quot; _
778 &amp; &quot;Check its syntax, table and/or field names, ...\n\n&quot; _
779 &amp; &quot;SQL Statement : « %1 »&quot; _
780 , Comment := &quot;SF_Database can&apos;t interpret SQL statement\n&quot; _
781 &amp; &quot;%1: The statement&quot; _
783 End With
784 End If
786 Finally:
787 Exit Sub
788 Catch:
789 GoTo Finally
790 End Sub &apos; ScriptForge.SF_Root._LoadLocalizedInterface
792 REM -----------------------------------------------------------------------------
793 Public Function _Repr() As String
794 &apos;&apos;&apos; Convert the unique SF_Root instance to a readable string, typically for debugging purposes (DebugPrint ...)
795 &apos;&apos;&apos; Args:
796 &apos;&apos;&apos; Return:
797 &apos;&apos;&apos; &quot;[Root] (MainFunction: xxx, Console: yyy lines, ServicesList)&quot;
799 Dim sRoot As String &apos; Return value
800 Const cstRoot = &quot;[Root] (&quot;
802 sRoot = cstRoot &amp; &quot;MainFunction: &quot; &amp; MainFunction &amp; &quot;, Console: &quot; &amp; UBound(ConsoleLines) + 1 &amp; &quot; lines&quot; _
803 &amp; &quot;, Libraries:&quot; &amp; SF_Utils._Repr(ServicesList.Keys) _
804 &amp; &quot;)&quot;
806 _Repr = sRoot
808 End Function &apos; ScriptForge.SF_Root._Repr
810 REM -----------------------------------------------------------------------------
811 Public Sub _StackReset()
812 &apos;&apos;&apos; Reset private members after a fatal/abort error to leave
813 &apos;&apos;&apos; a stable persistent storage after an unwanted interrupt
815 MainFunction = &quot;&quot;
816 MainFunctionArgs = &quot;&quot;
817 StackLevel = 0
819 End Sub &apos; ScriptForge.SF_Root._StackReset
821 REM ================================================== END OF SCRIPTFORGE.SF_ROOT
822 </script:module>