calling js function from jslib

I am trying to call the buttonPress() function which is located in another js file…

.jslib below

mergeInto(LibraryManager.library, {

  HelloString: function (str) {
    window.alert(Pointer_stringify(str));  //called from c# just fine
    buttonPress();// how to call this function located in processing.js ?

  },

//js function

function buttonPress()
{
sendString("teststring");
}

//html reference to js script

 </script>
    <script type="text/javascript" src="processing.js"></script>
  </body>

I am able to call the HelloString function from c#, which passes the name of the button pressed to the output window, but receive the error that it cannot find the variable buttonPress_HelloString.

1 Like
1 Like