From c21919a2105bd1ed4f060be149624d064739a36c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 7 Mar 2022 12:14:39 -0500
Subject: got rid of include cycles for Scripting globals to make hot updates
 work better.

---
 src/client/views/nodes/ScriptingBox.tsx | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'src/client/views/nodes/ScriptingBox.tsx')

diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index c39501df9..366c3fc2f 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -12,7 +12,8 @@ import { TraceMobx } from "../../../fields/util";
 import { returnEmptyString } from "../../../Utils";
 import { DragManager } from "../../util/DragManager";
 import { InteractionUtils } from "../../util/InteractionUtils";
-import { CompileScript, Scripting, ScriptParam } from "../../util/Scripting";
+import { CompileScript, ScriptParam } from "../../util/Scripting";
+import { ScriptingGlobals } from "../../util/ScriptingGlobals";
 import { ScriptManager } from "../../util/ScriptManager";
 import { ContextMenu } from "../ContextMenu";
 import { ViewBoxAnnotatableComponent, ViewBoxAnnotatableProps } from "../DocComponent";
@@ -37,9 +38,9 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable
     @observable private _function: boolean = false;
     @observable private _spaced: boolean = false;
 
-    @observable private _scriptKeys: any = Scripting.getGlobals();
-    @observable private _scriptingDescriptions: any = Scripting.getDescriptions();
-    @observable private _scriptingParams: any = Scripting.getParameters();
+    @observable private _scriptKeys: any = ScriptingGlobals.getGlobals();
+    @observable private _scriptingDescriptions: any = ScriptingGlobals.getDescriptions();
+    @observable private _scriptingParams: any = ScriptingGlobals.getParameters();
 
     @observable private _currWord: string = "";
     @observable private _suggestions: string[] = [];
@@ -219,9 +220,9 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable
 
         ScriptManager.Instance.addScript(this.dataDoc);
 
-        this._scriptKeys = Scripting.getGlobals();
-        this._scriptingDescriptions = Scripting.getDescriptions();
-        this._scriptingParams = Scripting.getParameters();
+        this._scriptKeys = ScriptingGlobals.getGlobals();
+        this._scriptingDescriptions = ScriptingGlobals.getDescriptions();
+        this._scriptingParams = ScriptingGlobals.getParameters();
     }
 
     // overlays document numbers (ex. d32) over all documents when clicked on
-- 
cgit v1.2.3-70-g09d2

