Firstly well done to the team for what you have achieved in just one year.
Can you tell me how to go about getting an existing VO (2.7) project into xSharp. I do not mind doing all required coding changes, it will give me a chance to learn X# while I am at it. I am just not sure where to start.
We do not have a tool at this moment to automate this for you.
Fabrice is working on an AEF to VS Project converter.
If you do not want to wait for this, then this is what I would recommend:
- Create an empty .Net project
- If you want to use xBase types such as ARRAY and USUAL you need to set the Dialect to VO or Vulcan and add references to the Vulcan Runtime DLLs
- Export the source in your VO project to PRG files (if I am correct you should be able to right click the modules list in an app and export to PRG)
- Copy the PRG files to your VS project folder
- Choose 'Add Existing Item' and add all the PRG files to your project
Rearrange the code in your prg files:
x Add a line 'END CLASS' to each class declaration
x Move the methods inside the CLASS ... END CLASS and remove the 'CLASS <MyClass>' from the method declaration
x Change METHOD Init() to CONSTRUCTOR() and Method AxitIO to DESTRUCTOR()
x When you use 'Late Bound' code you must set the 'Allow Late Binding' compiler option
x You may have to set other VO Compatibility options
XSharp Development Team
I bought and installed Vulcan but it was less productive for me than VO. The VO repository is sometimes a pain, but most of the time it is a great help to keep everything organised. Now I am retired and the time pressure is gone, I only kept one (big) project to keep me a bit busy So the temptation is to convert this huge program to X#.
To answer your question : I did nothing in Vulcan with the ADS RDD's and it would be interesting to know how to "initialise them" in X# to make it work.
I converted the VO software that comes with ADS to X# everything compiled ok and I can connect to the database without problems. Opening the files did not work.
You must load the RDD assembly using Assembly.Load
You either set the default RDD using RddSetDefault("Advantage.AXDBFCDX")
Or you prefix the RDD name with "Advantage." in your code
The reason for this is that for VO the RDD name was the file name. In DotNet the name of the RDD is the classname. You either pass the complete classname (NamespaceName.ClassName) or as an alternative you can tell the runtime (before opening any files) which type should match with RDD name with the following code:
Thank you for your prompt reaction. I have been trying for several hours now.
I read the documentation, but ran into trouble very quickly. Have tried all your said, and all kind of things, like downloading the latest AdvantageRDD.dll... according to ADS it should be CLR version 4.0, although when I put it in the GAC, it is only visible as a CLR 2.0 (and showing the correct file version info : 220.127.116.11), don't think that is the problem though.
Thank you for the guide on how to do it manually, I will be getting on to that now.
Two specific questions:
1. Since we are now in .net with this can I use any .net mysql connector to connect to a mysql server for database access? I had to use ODBC before.
2. if you have a window resource that was created in the VO designer, does x# make use of that or do we have to redo the window designs? (could we change it in VO and copy back to X#)?
Thanks for your efforts and assistance you are giving us.
As Robert said, you are indeed compiling with the vulcan compiler (XIDE can compile x#, vulcan and c# apps). Please check the Project window, next to your app and libraries there's a "-VN" sign, saying that this is a vulcan app. It's easy to change it, through Application/Properties/General, change "Language" to x# and "Dialect" to "<vulcan>". But I'd suggest leaving it as at is for now, let's debug this step by step.
The first error you get, is due to a copy/paste clipboard error, see the signs surrounding "AdvantageRDD" in the red line, they are special characters, not normal double quotes. Replace those with double quotes (") and this error will go away.
The rest of the errors mean that the advantage RDD can not be loaded, because it is compiled against a different version of the vulcan runtime (401) than the one that you have. I assume you are using vulcan 3, or maybe one of the public trial versions? Which build exactly? You need to use the advantage RDD that was released specifically for the vulcan build that you are using, this is the main problem. I am sure you can find older versions of the advantage dlls in the ADS website. And I think you can also find CLR 4 dlls for older vulcan builds, at least I think I remember when I was part of the vulcan dev team, the ADS guys were releasing both CLR2 and CLR4 dlls separately.
1) Yes you can use any .NET datasource to connect to data. I would recommend you do that in stead of using the 'Old' SQL classes and ODBC.
2) If you mean 'VO Windows Binary' with resources, then the answer is Yes. X# will be able to use these and generate the source for the windows. Of course the windows will still be 'VO GUI' windows and will not be true Windows Forms or WPF windows.
Paul Piko has a tool, called FaceLift, that will read the Windows BInaries and will allow you to convert these to Windows Forms ( http://www.vulcanmindmeld.net/
Since the object model and events are different you will still have to manually port the events such as EditFocusChange and EditChange.
XSharp Development Team