changeset 509:1b9973905e15 bgo-commands-codegen

Fix to use js callbacks attached to 'window' + dummy changes in cmake files
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 06 Mar 2019 10:57:02 +0100
parents 7105a0bad250
children 97a16b694321
files Platforms/Wasm/WasmWebService.js Resources/CMake/OrthancStoneConfiguration.cmake Resources/CMake/OrthancStoneParameters.cmake
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.js	Wed Mar 06 10:14:59 2019 +0100
+++ b/Platforms/Wasm/WasmWebService.js	Wed Mar 06 10:57:02 2019 +0100
@@ -37,7 +37,7 @@
 
   WasmWebService_ScheduleLaterCachedSuccessNotification: function (brol) {
     setTimeout(function() {
-      WasmWebService_NotifyCachedSuccess(brol);
+      window.WasmWebService_NotifyCachedSuccess(brol);
     }, 0);
   },
 
@@ -62,10 +62,10 @@
           var headers = _malloc(s.length + 1);
           stringToUTF8(s, headers, s.length + 1);
 
-          WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response),
+          window.WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response),
                                        this.response.byteLength, headers, payload);
         } else {
-          WasmWebService_NotifyError(callableFailure, url_, payload);
+          window.WasmWebService_NotifyError(callableFailure, url_, payload);
         }
       }
     }
@@ -94,10 +94,10 @@
           var headers = _malloc(s.length + 1);
           stringToUTF8(s, headers, s.length + 1);
 
-          WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response),
+          window.WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response),
                                        this.response.byteLength, headers, payload);
         } else {
-          WasmWebService_NotifyError(callableFailure, url_, payload);
+          window.WasmWebService_NotifyError(callableFailure, url_, payload);
         }
       }
     }
--- a/Resources/CMake/OrthancStoneConfiguration.cmake	Wed Mar 06 10:14:59 2019 +0100
+++ b/Resources/CMake/OrthancStoneConfiguration.cmake	Wed Mar 06 10:57:02 2019 +0100
@@ -102,6 +102,8 @@
   add_definitions(-DORTHANC_ENABLE_NATIVE=0)
 endif()
 
+
+
 #####################################################################
 ## Configuration of the C/C++ macros
 #####################################################################
--- a/Resources/CMake/OrthancStoneParameters.cmake	Wed Mar 06 10:14:59 2019 +0100
+++ b/Resources/CMake/OrthancStoneParameters.cmake	Wed Mar 06 10:57:02 2019 +0100
@@ -22,8 +22,6 @@
 ## Import the parameters of the Orthanc Framework
 #####################################################################
 
-message("CMAKE_CURRENT_LIST_DIR = ${CMAKE_CURRENT_LIST_DIR}")
-
 include(${CMAKE_CURRENT_LIST_DIR}/../../Resources/Orthanc/DownloadOrthancFramework.cmake)
 include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)