adedoyinNteligen commented on code in PR #1698:
URL: https://github.com/apache/daffodil-vscode/pull/1698#discussion_r3267103506


##########
src/launchWizard/script.js:
##########
@@ -508,4 +618,21 @@ async function updateDaffodilDebugClasspath(message) {
         break
     }
   })
+
+  //  IMPORTANT: tell extension we are ready
+  // updateConfig was not getting used before i added this. It may have been 
working before because the extension was sending the config values before the 
webview was ready, so the first message was getting lost. Now, we wait to send 
the message until after the webview is ready, so we know for sure that the 
config values will be received and rendered in the webview when it loads.
+  // Without this, tunables table would not pull from launch.json
+  //Other fields worked however, maybe because they were different data types?
+  //Confirm if this is a good addition to the code or if there is a better way 
to ensure the config values are received and rendered in the webview on load
+  window.addEventListener('DOMContentLoaded', () => {
+    // vscode is injected by extension
+    if (typeof vscode !== 'undefined') {
+      vscode.postMessage({
+        command: 'updateConfigValue',
+        configIndex: 0,

Review Comment:
   dont hardcode 0. grab the config index



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to