Re: PB.Ex WebGadget (Windows) (WebKit)
Posted: Mon Apr 29, 2019 10:53 am
Thanks for your tip. That's interesting. Unfortunately it is only for C++. I take a look at it.
http://www.purebasic.com
https://www.purebasic.fr/english/
I will check that.HanPBF wrote:Could You check if it is possible to set RemoteDebuggingPort? Or is there a default port?
Unfortunately it is not possible to change the path at the moment. Also not with SetCurrentDirectory(). I will check that.HanPBF wrote:Unfortunately when I put the sources and DLLs and rest of the files into a sub directory of current exe, program crashes.
No, Fred or Timo can ask me if a library should be implemented.HanPBF wrote:Did You talk to PB team if they want to embed this regularly in PB?
I added this. You can use the function EnableRemoteDebugger() with your any port number.HanPBF wrote:Could You check if it is possible to set RemoteDebuggingPort? Or is there a default port?
I looked at the C++ component. Unfortunately the effort is too big. I would either have to develop a C++ wrapper for my C# DLL that passes to PB or I would have to rebuild my complete C# DLL in C++ with all functions.LuckyLuke wrote:I was wondering if it would be easy to replace the current engine by https://ultralig.ht/.
The reason I ask this ...Ultra-light
Only 8MB compressed, low memory usage, we've stripped WebKit to the bare essentials.
Thanks for the feedback.I looked at the C++ component. Unfortunately the effort is too big. I would either have to develop a C++ wrapper for my C# DLL that passes to PB or I would have to rebuild my complete C# DLL in C++ with all functions.
Great!Changelog:
Added: EnableRemoteDebugger()
Code: Select all
procedure.s testCallfromJS()
...
endProcedure
Code: Select all
procedure createXMLExcelWorkbook()
var R = xlCreateXMLBookW()
xlBookSetKeyW(R, "...", "...")
ret R
endProcedure
Code: Select all
var PB;
(async function (){
await CefSharp.BindObjectAsync('PBProcedure');
PB = PBProcedure
})();
Code: Select all
BindWebGadgetExJavaScript(PB, "createXMLExcelWorkbook", @createXMLExcelWorkbook(), GetCurrentProcessId_(), @ErrorOutputWebGadgetEx)
Code: Select all
async init(){
this.Nr = await PB.call('createXMLExcelWorkbook')
}
Code: Select all
LibXL.js:67 Uncaught (in promise) System.InvalidOperationException: Could not execute method: call(createXMLExcelWorkbook, System.Reflection.Missing) - Missing Parameters: 1 ---> System.ArgumentException: Der fehlende Parameter hat keinen Standardwert.
Parametername: parameters
bei System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
bei System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei CefSharp.Internals.JavascriptObjectRepository.TryCallMethod(Int64 objectId, String name, Object[] parameters, Object& result, String& exception) in C:\projects\cefsharp\CefSharp\Internals\JavascriptObjectRepository.cs:Zeile 295.
--- Ende der internen Ausnahmestapelüberwachung ---
bei CefSharp.Internals.JavascriptObjectRepository.TryCallMethod(Int64 objectId, String name, Object[] parameters, Object& result, String& exception) in C:\projects\cefsharp\CefSharp\Internals\JavascriptObjectRepository.cs:Zeile 304.
The call must be this:HanPBF wrote:and call to the functionCode: Select all
async init(){ this.Nr = await PB.call('createXMLExcelWorkbook') }
Code: Select all
PBProcedure.call('createXMLExcelWorkbook', '');
Code: Select all
LibXL.Workbook.init; this.Nr:[object Promise]
Code: Select all
Uncaught (in promise) System.InvalidOperationException: Could not execute method: call(createXMLExcelWorkbookWG, ) ---> System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
bei System.ThrowHelper.ThrowKeyNotFoundException()
bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)