PB.Ex WebGadget (Windows) (WebKit)
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
Thanks for your tip. That's interesting. Unfortunately it is only for C++. I take a look at it.
Re: PB.Ex WebGadget (Windows) (WebKit)
Could You check if it is possible to set RemoteDebuggingPort? Or is there a default port?
Is there a problem running this whole thing on Windows Server 2016? (Don't ask why...)
I checked the debugging feature, JavaScript function call and PureBasic procedure call from JS.
Again, what a great work!
Is there a problem running this whole thing on Windows Server 2016? (Don't ask why...)
I checked the debugging feature, JavaScript function call and PureBasic procedure call from JS.
Again, what a great work!
ERROR; PB.Ex WebGadget (Windows) (WebKit)
Hello RSBasic!
Unfortunately when I put the sources and DLLs and rest of the files into a sub directory of current exe, program crashes.
Worse, there is no error message just the crash.
Did You talk to PB team if they want to embed this regularly in PB?
(cross OS development is not an argument)
Unfortunately when I put the sources and DLLs and rest of the files into a sub directory of current exe, program crashes.
Worse, there is no error message just the crash.
Did You talk to PB team if they want to embed this regularly in PB?
(cross OS development is not an argument)
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
Hello HanPBF
I'm currently working on PB.Ex Mail.
Currently PB.Ex WebGadget is not ready yet.
I'm currently working on PB.Ex Mail.
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?
Currently PB.Ex WebGadget is not ready yet.
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
PB.Ex WebGadget 1.0.6.0 has been released.
Changelog:
Changelog:
- Added: EnableRemoteDebugger()
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?
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
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.
Re: PB.Ex WebGadget (Windows) (WebKit)
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.
Might be an option in the (near) future when they have c# bindings
LuckyLuke
Re: PB.Ex WebGadget (Windows) (WebKit)
Great!Changelog:
Added: EnableRemoteDebugger()
Thanks a lot!
Re: PB.Ex WebGadget (Windows) (WebKit)
I just try to map LibXL into JS with PB Ex Webgadget.
Does the call from JS to PureBasic always needs a string as return value?
So:
I get null as return value even PureBasic debug output shows a number.
Does the call from JS to PureBasic always needs a string as return value?
So:
Code: Select all
procedure.s testCallfromJS()
...
endProcedure
I get null as return value even PureBasic debug output shows a number.
Last edited by HanPBF on Fri May 17, 2019 1:44 pm, edited 1 time in total.
Re: PB.Ex WebGadget (Windows) (WebKit)
Ok, could try myself if string as return value would work...
Did not -> always returning null.
Any idea?
Did not -> always returning null.
Any idea?
Re: PB.Ex WebGadget (Windows) (WebKit)
Before not getting back a result, I try to call a libxl procedure:
When I call this code from Javascript after all the binding stuff:
and call to the function
I get this error:
So, an argument for createXMLExcelworkbook is missing where no argument is needed...
Any idea?
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.
Any idea?
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
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', '');
Re: PB.Ex WebGadget (Windows) (WebKit)
Ok, I mapped the variabe PBProcedure to a global variable PB.
I guess the call must be with wait, as it is async called and gives back a promise:
That was the second question: are values being returned?
With the default value of '' I get then
Thanks a lot!
I guess the call must be with wait, as it is async called and gives back a promise:
Code: Select all
LibXL.Workbook.init; this.Nr:[object Promise]
With the default value of '' I get then
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)
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex WebGadget (Windows) (WebKit)
Sorry, I don't understand.
Do you have a complete executable example code? You can send the code here or via PM.
I have an example code here: viewtopic.php?f=27&t=72703
With the buttons "BindProc" and "CallProc" I can understand. How do you do it?
Do you have a complete executable example code? You can send the code here or via PM.
I have an example code here: viewtopic.php?f=27&t=72703
With the buttons "BindProc" and "CallProc" I can understand. How do you do it?
Re: PB.Ex WebGadget (Windows) (WebKit)
This is the question:
is it correct that I don't get a return value when calling a PureBasic procedure from JavaScript?
Thanks in advance!
Regards!
is it correct that I don't get a return value when calling a PureBasic procedure from JavaScript?
Thanks in advance!
Regards!