Page 1 of 3
bBrowser.NET migration to X#
Posted: Mon Nov 13, 2017 3:37 pm
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
bBrowser.NET migration to X#
Posted: Tue Nov 14, 2017 4:28 am
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
to
If anyone needs it until bBrowser.NET is released for X#, you will find it attached to this message.
Wolfgang
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 10:03 am
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
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 11:20 am
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
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 11:47 am
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,
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 12:08 pm
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
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 12:28 pm
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
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 12:30 pm
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,
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 12:36 pm
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.
bBrowser.NET migration to X#
Posted: Sun Jun 10, 2018 12:39 pm
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,