fbpx
× Welcome to the XSharp forum!

Tell us and our members who you are, what you like and why you became a member of this site.
We welcome all new members and hope to see you around a lot!

Beginner questions

More
2 months 1 week ago #1 by Jamal Mazrui
Beginner questions was created by Jamal Mazrui
I have a background in Clipper from the 1990s, but no experience with VO or Vulcan. I am comparing xBase++ and XSharp as possible languages for developing Windows database apps. I have installed XSharp beta 5 from September 2018, as well as the trial version of Vulcan 3.0.

How do I get the xsi.exe interpreter to work? I have tried running it from a command prompt in its own directory, but I get an error about a missing cultural language. I tried setting the path to include Vulcan runtime files, but the result is the same.

I am particularly interested in being able to use both ISAM and SQL commands in a command window. Is that possible with the current public beta (e.g., via Advantage Local Server or otherwise)?

Are there samples available that have already been compiled into binaries and are ready to run?

For browsing a table, does XSharp use a standard Windows Forms control or its own custom control? I use a screen reader (as a blind user), which tends to work best with standard as opposed to custom controls (because standard controls generally implement the accessibility API of Windows).

Jamal

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

More
2 months 1 week ago #2 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic Beginner questions
Hi Jamal,

as opposed to Clipper and Xbase++, X# uses an IDE to develop and build the programs.
You have the choices between Microsoft Visual Studio and XIDE (that comes with X#).

XSI is only a script interpreter, not the compiler itself.

In XIDE (and also in Visual Studio) you can find some samples.
Currently X# has no own controls or forms to build applications, it relies on WPF or Winforms instead.

Please try to play a bit with XIDE and it samples, and if you have questions, feel free to ask here.

And yes: welcome here!

Wolfgang

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

More
2 months 1 week ago #3 by Jamal Mazrui
Replied by Jamal Mazrui on topic Beginner questions
Thanks, Wolfgang.

I searched the directory trees for Xsharp (both under Program Files and under Documents), Visual Studio, and XIDE, but did not find any executable XSharp samples. I would like to examine binary examples without having to learn how to use the compiler yet.

Are you saying that it is not practical to code XSharp programs with a text editor and that an IDE is needed instead? This would be unusual for a .NET-based language as I have coded in C#, Visual Basic, and JScript.NET all without using Visual Studio or another IDE.

Does XSharp currently support access to an RDD via both ISAM (GO TOP, SKIP, etc.) and SQL commands?

How can I try the XSI interpreter (I realize it is not the compiler)? When I run xsi.exe from its own directory the following message results:

System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "LanguageService.CodeAnalysis.Scripting.XSharpScriptingResources.resources" was correctly embedded or linked into assembly "XSharp.Scripting" at compile time, or that all the satellite assemblies required are loadable and fully signed.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at LanguageService.CodeAnalysis.Scripting.XSharpScriptingResources.get_LogoLine1()
at LanguageService.CodeAnalysis.XSharp.Scripting.Hosting.XSharpInteractiveCompiler.PrintLogo(TextWriter consoleOutput)
at LanguageService.CodeAnalysis.Scripting.Hosting.CommandLineRunner.RunInteractiveCore(ErrorLogger errorLogger)
at LanguageService.CodeAnalysis.Scripting.Hosting.CommandLineRunner.RunInteractive()
at LanguageService.CodeAnalysis.XSharp.Scripting.Hosting.Xsi.Main(String[] args) in C:\XSharp\Dev\XSharp\src\Scripting\xsi\Xsi.cs:line 44

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

More
2 months 1 week ago #4 by Chris Pyrgas
Replied by Chris Pyrgas on topic Beginner questions
Hi Jamal,

Thanks for the report about running xsi, apparently there's some problem with it, we'll look into it.

About needing an IDE, they are not strictly needed, but they make life a lot easier, although if you want you can still program in X# by using notepad or any editor and compile with a .bat file or any other means you prefer. But using an IDE is extremely simple, it's plug and play! No need at all to learn how to use the compiler or anything:

In XIDE, you just run it, in the opening screen you select "New" to create a new project, open it, then select from the menu Project->Create New->New application, pick one of the templates which include empty or simple console, windows etc apps, or pick one of the sample apps (many created by Wolfgang - thanks!), all needed files will be auto created and all you need to do is simply select "Run" to run the app. This will automatically compile the code and run the app. It is all really a few seconds' job, no need to configure anything, adjust paths or anything else. It is similar with VS, you just create a new project, pick one of the X# templates and run.

Chris

XSharp Development Team
chris(at)xsharp.eu

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

More
2 months 1 week ago #5 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic Beginner questions
Hi Jamal,

I will try to answer your questions.

I searched the directory trees for Xsharp (both under Program Files and under Documents), Visual Studio, and XIDE, but did not find any executable XSharp samples. I would like to examine binary examples without having to learn how to use the compiler yet.


AFAIK there is no compiled sample. Startup XIDE and play with the samples there, that is the best thing.
Chris is the author of XIDE, and if you need some explanation or enhancement to be able to work with it, ask here.

Unfortunately I have no idea how you work with your programs. Normally, a X# application is built by more prg files (just like clipper). In Clipper, you had to use rmake or write your own build batch file. With X# it is better to use an integrated development environment, and XIDE should be better suited because it is based on WinForms and has a source oriented approach - that is what I like about it.
Of course in the background XIDE calls the compiler with a command line and there is no problem at all to make this from your own batch file.

Does XSharp currently support access to an RDD via both ISAM (GO TOP, SKIP, etc.) and SQL commands?

I don't know if the commands are already implemented. I have not used them for years, because I prefer the object oriented approach.
Currently, only the DBFNTX RDD is fully implemented, and the ADS RDD (but this needs the Advantage Database Server at least in the local server version). Only the ADS supports SQL commands, but I hope to have SQL commands also in a later version of the RDDs - but this will take time.
But of course X# supports all the data access options the .NET framework offers, like Ado.NET or the Entity Framework.

Wolfgang

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

More
2 months 1 week ago #6 by Jamal Mazrui
Replied by Jamal Mazrui on topic Beginner questions
Thanks for assistance. Although I could not find code examples through the XIDE UI, I did find several under the directry tree:
C:/Users/Public/Documents/XSharp/Examples/

However, I have not yet found sample code -- either in those subdirectories or via a web search -- for using DBF-NTX with the free Advantage Local Server. This is a strong interest of mine in order to have the ability to use either ISAM or SQL commands on the same database.

Can someone plese post sample code for opening one of the X# sample DBF files via Advantage Local Server? It is fine for the code to assume that the needed Advantage DLLs are available.

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

More
2 months 1 week ago #7 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic Beginner questions
Hi Jamal,

currently there are no samples using the RDDs. Maybe I have to prepare some, but unfortunately I'm very, very short on time. I will see what I can do on the weekend.

Wolfgang

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