bBrowser.NET migration to X#

Public forum to share code snippets, screen shorts, experiences, etc.
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser.NET migration to X#

Post by wriedmann »

Hi,

until a bBrowser.NET version is released specifically for X#, I would like to post a migration guide for people that cannot wait.

Please see it attached to this message.

Wolfgang
Attachments
Migration_of_bBrowser.pdf
(359.44 KiB) Downloaded 122 times
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser.NET migration to X#

Post by wriedmann »

Hi all,

I'm now a step further: I have converted the 3 vh files you normally need to include in a .NET application using bBrowser.NET to a library, basically changing all statements like

Code: Select all

#define ASC_DOT 0x2E
to

Code: Select all

define ASC_DOT := 0x2E
If anyone needs it until bBrowser.NET is released for X#, you will find it attached to this message.
Wolfgang
Attachments
bIncludes.zip
(14.37 KiB) Downloaded 117 times
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
nkristensen
Posts: 8
Joined: Sat Feb 24, 2018 6:58 am
Location: South Africa

bBrowser.NET migration to X#

Post by nkristensen »

Wolfgang (or anyone else),

Thank you very much for this. I am a real newbie with his .NET stuff. I was a VPOS member, bought bBrowser.Net, etc but never got any of it to work in real work applications. Now I am trying XS and I am sure I will come right eventually!

I followed your bBrowser migration guidelines and am getting errors XS0246: The type or namespace name 'DBServer' could not be found (are you missing a using directive or an assembly reference?)

I have added references to VulcanVORDDClasses, etc but error won't go away.

Any help would be appreciated.

regards,
Niels
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser.NET migration to X#

Post by wriedmann »

Hi Niels,

the DBServer class is defined in the VulcanVORDDClasses.DLL, but the DataServer (from which the DBServer is inherited) is in the VulcanVOSystemClasses.DLL, so you need to include this library as well.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

bBrowser.NET migration to X#

Post by lumberjack »

Hi Niels,
nkristensen wrote: I have added references to VulcanVORDDClasses, etc but error won't go away.
Did you also inlclude a USING statement in the top of your PRG? Otherwise you need to maybe provide the full namespace of the DbServer class. Might be good to show some code to get you on track.
Regards,
______________________
Johan Nel
Boshof, South Africa
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

bBrowser.NET migration to X#

Post by wriedmann »

Hi Johan,

a using statement should not be needed as all of the VO classes are using the namespace Vulcan.VO. (of course the compiler option /ins "Use implicit namespace" needs to be used.)

The question is now if the error shows up in the bBrowser compilation process or in an application that uses the bBrowser libraries.
For the first one, the following libraries are needed:
mscorlib.dll
SDK_Defines.dll
VulcanRT.dll
VulcanRTFuncs.dll
VulcanVOGuiClasses.dll
VulcanVORDDClasses.dll
VulcanVOSystemClasses.dll
VulcanVOWin32ApiLibrary.dll

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
nkristensen
Posts: 8
Joined: Sat Feb 24, 2018 6:58 am
Location: South Africa

bBrowser.NET migration to X#

Post by nkristensen »

Thanks Wolfgang / Johan,

This is what I have at the top of the one .prg

Code: Select all

#include "VORDDClasses.vh"
#include "VOSystemClasses.vh"
#include "VOSystemLibrary.vh"
//#include "bServer.vh"     

BEGIN NAMESPACE bTools.bServer

   CLASS bDBServer INHERIT DBServer
I have added references to both VulcanVORDDClasses and VulcanVOSystemClasses

I also tried the /ins compiler option, hut hat then gives a lot of other errors:
error XS9041: Override of virtual method 'Close' has STRICT calling convention but overridden method in parent class is CLIPPER. 1139,7 bArrayServer (Server).prg bServer


Regards,
Niels
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

bBrowser.NET migration to X#

Post by lumberjack »

Hi Wolfgang,
wriedmann wrote: a using statement should not be needed as all of the VO classes are using the namespace Vulcan.VO. (of course the compiler option /ins "Use implicit namespace" needs to be used.)
The question is now if the error shows up in the bBrowser compilation process or in an application that uses the bBrowser libraries.
I agree, was also my thoughts. Think Niels should show us the complete error message and maybe the code snippet that produces the error. Without seeing the context it could be created in a couple of places.
Regards,
______________________
Johan Nel
Boshof, South Africa
User avatar
nkristensen
Posts: 8
Joined: Sat Feb 24, 2018 6:58 am
Location: South Africa

bBrowser.NET migration to X#

Post by nkristensen »

I have added all those references. I am compiling the bServer application of bBrowser, and get the following errors:
error XS0246: The type or namespace name 'DataServer' could not be found (are you missing a using directive or an assembly reference?)

for both DBServer and DataServer. If I use the /ins compiler option, then I get the other errors in my previous post. No other compiler options are selected.
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

bBrowser.NET migration to X#

Post by lumberjack »

nkristensen wrote: This is what I have at the top of the one .prg

Code: Select all

#include "VORDDClasses.vh"
#include "VOSystemClasses.vh"
#include "VOSystemLibrary.vh"
//#include "bServer.vh"
Just to clarify, by adding reference do you mean the #include statements or a reference in you project to the VORDDClasses.dll assembly? You need a reference to the assembly in your project, not just a #include.
Regards,
______________________
Johan Nel
Boshof, South Africa
Post Reply