Page 1 of 2
DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:18 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:32 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:37 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:46 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:48 am
by robert
Arun,
Does your project have references to both VOGUIClasses and XSharp.VOGUIClasses?
Robert
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 7:54 am
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 ?
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 8:03 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 8:15 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 8:56 am
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
Re: DataBrowser initialization is throwing error in X# - VO dialect Winform
Posted: Wed Oct 11, 2023 4:45 pm
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.