Hi,
I am trying to pass java script function as parameter to c# function. I implement this using action delegate but throws invalid arguments exception.
Thanks and Regards
Praveen Kumar
I am trying to pass java script function as parameter to c# function. I implement this using action delegate but throws invalid arguments exception.
public class ScriptFunctions
{
..//MainForm property
public void LaunchWinForm(Action launcAction)
{
try
{
if (MainForm.InvokeRequired)
{
MainForm.Invoke(new MethodInvoker(launcAction)), null);
}
else
launcAction)();
}
catch (Exception)
{
throw;
}
}
}
v8TriggerEngine.AddHostObject("ScriptLib", new ScriptFunctions());
from javscriptvar form=new WinForms.System.Windows.Forms.Form();
var delconncect=_fileWatcher.Created.connect(function(obj,e){
ScriptLib.LaunchWinForm(function(){
form.Show();
});
});
Engine throws invalid argument exception.Thanks and Regards
Praveen Kumar