fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to use Bbrowser.Net in my Application?

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #1

  • Intexso
  • Intexso's Avatar Topic Author
  • Offline
  • Posts: 63
Hello,

I just downloaded Bbrowser.NET and installed it on my machine. (I have chosen for the Vulcan 3 option).

I am porting my VO application to X# and am working in XIDE.

In VO I used bBrowser standard and used bBrowser and bArrayserver. In my application I made 2 classes which inherited from this classes.

I tried to add the Assemblies bTools.bBrowser.dll and bTools.bServer.dll, but this didn't work.

What'is the best way to embed bBrowser in my application?

Eric

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

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #2

Eric,
Can you be a more specific then "this didn't work". What was the error message that you got? Did you include the bBrowser header files in your code? Did you include the USINGs for bTools.bServer and bTools.bBrowser?

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

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

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #3

  • wriedmann
  • wriedmann's Avatar
  • Offline
  • Posts: 1423
  • Karma: 6
Hi Eric,

I'm using the bBrowser in some of my ported VO applications, and since I have the source code version, I have also recompiled it with X#.

If you have the Vulcan 3 runtime, you need also the Vulcan 3 version of the bBrowser - this was an issue in VO and also in Vulcan.

Wolfgang

Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it
Attachments:

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

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #4

  • Intexso
  • Intexso's Avatar Topic Author
  • Offline
  • Posts: 63
Hello Robert,

Sorry. The error message was:

error XS0246: The type or namespace name 'BBrowser' could not be found (are you missing a using directive or an assembly reference?) 2,1 Klasse BBrowserSIKOS.prg itxAlgemeen


I added to my code
USING bTools.bBrowser
USING bTools.bServer

and now it seems to work (I have a lot of work to do before my application will run and I can really test it).

It is not yet clear to me when USING should be used and when adding a reference is sufficient...

@Wolfgang: I chose the Vulcan 3 version of bBrowser, but I never worked with Vulcan, so I don't know the differences. Are the runtimes used in X# more Vulcan 2? And is it better to use the Vulcan 2 version of bBrowser?

Eric

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

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #5

  • wriedmann
  • wriedmann's Avatar
  • Offline
  • Posts: 1423
  • Karma: 6
Hi Eric,

the source of the bBrowser should bet the same between Vulcan 2, 3 and 4. It depends only on the version of the Vulcan runtime you have.

Regarding your question about namespaces: please look here for an explanation: docs.xsharp.it/doku.php?id=namespace_assembly_reference

If this leaves questions, please let me know and I will extend the description.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

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

How to use Bbrowser.Net in my Application? 5 months 3 weeks ago #6

Eric,
The DotNet framework contains many many classes. To avoid name conflicts these classes are organized inside "collections". That are the namespaces.

In VO we did not have that. That is why 3rd party products often start their classnames with specific characters. RP for ReportPro, b for BBrowser and Ado for Vo2Ado.

Like the article from Wolfgang says: by adding a using statement you tell the compiler in which collections to search. And you have to also add the assembly to the list of references.

In the Vulcan runtime the classes like DbServer and DataWindow are part of the Vulcan.VO namespace.
To make it easier for people migrating from VO we have added a special mechanism to the Vulcan compiler in the past and now also to the X# compiler: an assembly can add an attribute that lists namespaces that should be treated as "implicit". And we have added a compiler option that intructs the compiler to automatically add these "implicit namespaces" as using statements to your code.
If you check the properties of your application you will see that the transporter has enabled this option, so you can still use classes like DbServer and DataWindow without including using statements for these classes.
Vn2Ado also uses this mechanism. If you enable this option then you can use the Ado.. classes without extra using statement.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

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

  • Page:
  • 1