DataBrowser initialization is throwing error in X# - VO dialect Winform

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by ArunBerlin »

The following error was displayed on execution of line 4.

An exception of type 'VO.WCError' occurred in XSharp.Core.dll but was not handled in user code

Code: Select all

1.CONSTRUCTOR(oWindow,iCtlID,oServer,uExtra)  
2.self:PreInit(oWindow,iCtlID,oServer,uExtra)
3.SUPER(oWindow,ResourceID{"UserForm",_GetInst()},iCtlID)

4.self:Browser := DataBrowser{self}
The values of constructor params are:
oWindow - Valid Object
iCtlID - 100
oServer - Valid Object
uExtra - NIL

There's isn't much help from exception message for further debug.
I've verified that corresponding Winform has a .NET DataGrid in its UI
User avatar
wriedmann
Posts: 3655
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by wriedmann »

Hi Arun,
the DataBrowser is not available in Windows Forms - it is a Win32 control available only in the VO GUI classes.
Or do you are using the new Windows Forms based GUI classes (XSharp.VOGUIClasses.dll)?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by ArunBerlin »

Wolfgang,

Yes, I'm using Windows Forms based GUI classes (XSharp.VOGUIClasses.dll).
On clicking of "Go To definition" on DataBrowser{self} in code, it points to library:

DataBrowser.prg
PUBLIC CLASS VO.DataBrowser INHERIT VO.Control
User avatar
wriedmann
Posts: 3655
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by wriedmann »

Hi Arun,
I don't know it the DataBrowser is yet supported in these classes.
Anyway, you should download the actual sources from Github and use these.
Robert has done several things in these classes since the release of 2.17 (and 2.18 incorporates them). I have no idea when 2.18 will be released, but should be this week for the conference in Memmingen.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4261
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by robert »

Arun,
Does your project have references to both VOGUIClasses and XSharp.VOGUIClasses?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by ArunBerlin »

Robert,

Only VOGUIClasses.DLL exist inside debug folder(exe folder). I tried adding VOGUIClasses.dll to the project reference also.
Do I need to download the latest XSharp release to get the XSharp.VOGUIClasses.dll ?
User avatar
robert
Posts: 4261
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by robert »

Arun,
You should only reference one of the 2 class libraries in your project. The classes in both libraries have the same name (in a different namespace).
That is why the editor "goes to" the wrong class when you do a goto definition.

We made some fixes in the XSharp.VOGUIClasses (which is a version of the GUI classes built on top of Windows.Forms). These changes will be included in the FOX version of 2.18 which is in Beta right now. Unfortunately there is a breaking issue in the debugger support, which will have to be fixed before we can release 2.18.
I expect the 2.18 release (end of) next week. The whole team is Germany right now, for the X# Summit, and experience has learned us that changing issues like this one during a conference is not a good idea. Wolfgang already has the beta version of this code and showing it during his session about UI alternatives in Memmingen.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by ArunBerlin »

Robert,

Sorry, there's some confusion. I've only added VOGUIClasses.dll in project reference

On Click of "Go To Definition" of DataBrowser{self}, it points to the following library:

C:\Program Files (x86)\XSharp\Assemblies\VOGUIClasses.dll
DataBrowser.prg
PUBLIC CLASS VO.DataBrowser INHERIT VO.Control
User avatar
robert
Posts: 4261
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by robert »

Arun,
Your topic title mentions "Windows.Forms"
The VOGuiClasses.DLLs is based on the "old" Visual Objects UI classes, so that is NOT Windows.Forms
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4584
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: DataBrowser initialization is throwing error in X# - VO dialect Winform

Post by Chris »

Hi Arun,

Most likely, you just need to copy all the CATO*.dll files from your VO \Bin folder to the folder where your X# .exe is located. The DataBrowser functionality is included in those dlls, so those need to be available at runtime to your app.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply