It is currently Tue Oct 22, 2019 12:21 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Mon Apr 29, 2019 10:53 am 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
Thanks for your tip. That's interesting. Unfortunately it is only for C++. I take a look at it.

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Tue Apr 30, 2019 7:10 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
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!


Top
 Profile  
Reply with quote  
 Post subject: ERROR; PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 03, 2019 9:12 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
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)


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 03, 2019 11:07 am 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
Hello HanPBF :)

I'm currently working on PB.Ex Mail.

HanPBF wrote:
Could You check if it is possible to set RemoteDebuggingPort? Or is there a default port?

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.

Unfortunately it is not possible to change the path at the moment. Also not with SetCurrentDirectory(). I will check that.

HanPBF wrote:
Did You talk to PB team if they want to embed this regularly in PB?

No, Fred or Timo can ask me if a library should be implemented.
Currently PB.Ex WebGadget is not ready yet.

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Sun May 05, 2019 8:52 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
PB.Ex WebGadget 1.0.6.0 has been released.

Changelog:
  • Added: EnableRemoteDebugger()

HanPBF wrote:
Could You check if it is possible to set RemoteDebuggingPort? Or is there a default port?

I added this. You can use the function EnableRemoteDebugger() with your any port number.

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Sun May 05, 2019 10:30 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
LuckyLuke wrote:
I was wondering if it would be easy to replace the current engine by https://ultralig.ht/.

The reason I ask this ...
Quote:
Ultra-light
Only 8MB compressed, low memory usage, we've stripped WebKit to the bare essentials.

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.

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Mon May 06, 2019 7:39 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Jun 06, 2003 2:41 pm
Posts: 177
Location: Belgium
Quote:
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.


Thanks for the feedback.
Might be an option in the (near) future when they have c# bindings :)

_________________

LuckyLuke


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Mon May 06, 2019 1:47 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
Quote:
Changelog:

Added: EnableRemoteDebugger()


Great!
Thanks a lot!


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 17, 2019 11:41 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
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:
Code:
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.

Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 17, 2019 1:44 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
Ok, could try myself if string as return value would work...

Did not -> always returning null.

Any idea?


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 17, 2019 2:11 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
Before not getting back a result, I try to call a libxl procedure:
Code:
procedure createXMLExcelWorkbook()
   var R = xlCreateXMLBookW()
      
   xlBookSetKeyW(R, "...", "...")
         
   ret R
endProcedure


When I call this code from Javascript after all the binding stuff:
Code:
var PB;
(async function (){
   await CefSharp.BindObjectAsync('PBProcedure');
   
   PB = PBProcedure
})();


Code:
BindWebGadgetExJavaScript(PB, "createXMLExcelWorkbook",      @createXMLExcelWorkbook(), GetCurrentProcessId_(), @ErrorOutputWebGadgetEx)

and call to the function
Code:
async init(){
      this.Nr = await PB.call('createXMLExcelWorkbook')
}


I get this error:
Code:
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.


So, an argument for createXMLExcelworkbook is missing where no argument is needed...

Any idea?


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Fri May 17, 2019 4:18 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
HanPBF wrote:
and call to the function
Code:
async init(){
      this.Nr = await PB.call('createXMLExcelWorkbook')
}

The call must be this:
Code:
PBProcedure.call('createXMLExcelWorkbook', '');


The second parameter can be empty (but not null) or you can send any text as string to your PB procedure.

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Mon May 20, 2019 6:52 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
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:
Code:
LibXL.Workbook.init; this.Nr:[object Promise]


That was the second question: are values being returned?

With the default value of '' I get then
Code:
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)


Thanks a lot!


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Mon May 20, 2019 11:27 am 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1102
Location: Germany::Berlin()
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?

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PB.Ex WebGadget (Windows) (WebKit)
PostPosted: Tue May 21, 2019 5:53 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
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!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye