Welcome, Guest
Username: Password: Remember me
Share your code snippets, screen shots etc. here
  • Page:
  • 1
  • 2

TOPIC:

bBrowser.NET migration to X# 13 Nov 2017 16:37 #3123

  • wriedmann
  • wriedmann's Avatar
  • Topic Author


  • Posts: 3185
  • 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
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 14 Nov 2017 05:28 #3126

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • 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
    #define ASC_DOT 0x2E
    to
    define ASC_DOT := 0x2E
    If anyone needs it until bBrowser.NET is released for X#, you will find it attached to this message.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it
    Attachments:

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 12:03 #4958

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • 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

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 13:20 #4959

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • 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

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 13:47 #4960

    • lumberjack
    • lumberjack's Avatar


  • Posts: 714
  • 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
    George, South Africa

    Please Log in or Create an account to join the conversation.

    Last edit: by lumberjack. Reason: Added namespace response

    bBrowser.NET migration to X# 10 Jun 2018 14:08 #4961

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • 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

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Last edit: by wriedmann.

    bBrowser.NET migration to X# 10 Jun 2018 14:28 #4962

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • Thanks Wolfgang / Johan,

    This is what I have at the top of the one .prg
    #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

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 14:30 #4963

    • lumberjack
    • lumberjack's Avatar


  • Posts: 714
  • 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
    George, South Africa

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 14:36 #4964

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • 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.

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 14:39 #4965

    • lumberjack
    • lumberjack's Avatar


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

    #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
    George, South Africa

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 14:43 #4966

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • Hi Johan,

    Yes, references in the project to the assemblies from GAC. '

    Regards,
    Niels

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 14:58 #4967

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • hi Niels,

    strange..... I'm using XIDE to compile, and I have not done anything strange.





    Do you are usings Visual Studio or XIDE?

    Wolfgang

    P.S. I'm using self compiled versions of the VO class libraries, therefore the "strange" name
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Last edit: by wriedmann.

    bBrowser.NET migration to X# 10 Jun 2018 14:59 #4968

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • Thanks Wolfgang,

    I am also using XIDE, but I have no complier options set. I will try your settings.

    Regards,
    Niels

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:14 #4969

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • Wolfgang,

    Working now using the same compiler options as you.

    Thank you very much to you and Johan.

    Regards,
    Niels

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:23 #4970

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • Hi Niels,

    You're welcome!

    If you find other difficulties, please drop a note here. I'll try to answer and to add it also to the X# Documentation Project,

    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Last edit: by wriedmann.

    bBrowser.NET migration to X# 10 Jun 2018 15:25 #4971

    • lumberjack
    • lumberjack's Avatar


  • Posts: 714
  • Hi Niels,

    nkristensen wrote: Thank you very much to you and Johan.

    You welcome, but the honor goes to Wolfgang. Glad you got it sorted out.
    Regards,
    ______________________
    Johan Nel
    George, South Africa

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:45 #4973

    • nkristensen
    • nkristensen's Avatar


  • Posts: 8
  • Sorry to trouble again, but now I am getting:

    error XS0426: The type name 'Functions' does not exist in the type 'bBrowser' 6,46 bptrCellGroupMove.prg bBrowser

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:49 #4974

    • wriedmann
    • wriedmann's Avatar
    • Topic Author


  • Posts: 3185
  • Hi Niels,

    strange....do you have applied the same compiler options also to the bBrowser library?

    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:49 #4975

    • Chris
    • Chris's Avatar


  • Posts: 3650
  • Guys, glad you have all resolved this, without help from us! In general, when you port code from vulcan to X#, you should be using the exact same compiler options in X# that also the vulcan app was using, we have intentionally used the exact same names in the properties pages of VS/XIDE, in order to make this as easy as possible.

    Specifically about the "Clipper/Strict" error, the issue is that when you have a method defined as

    METHOD Close() // no params or explicit return type

    then the compiler does not know if it should be defined as a strongly typed method, or it is a VO-style calling convention method. Using the /vo5 (implicit CLIPPER calling convention) option, tells the compiler to treat such methods as CLIPPER, which is what the rest of the bBrowser code uses.

    Chris
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    bBrowser.NET migration to X# 10 Jun 2018 15:53 #4976

    • Chris
    • Chris's Avatar


  • Posts: 3650
  • Hi Niels,

    nkristensen wrote: Sorry to trouble again, but now I am getting:

    error XS0426: The type name 'Functions' does not exist in the type 'bBrowser' 6,46 bptrCellGroupMove.prg bBrowser


    This is most probably due to a (one of the very few remaining) compiler problem, that you cannot have a class with the same name as the dll. Please check the options for this app, general page, what is the "Assembly Name" option set at? If it's bBrowser, then it will not work correctly, you will need to change it to something different, for example "bBrowserNet". I think the original value there as created by Joachim was "bTools.bBrowser".

    Chris
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1
    • 2