We have released XSharp 1.2 today. This release fixes some compiler issues and has many improvements in the Visual Studio integration.
There is both a new public release as well as a new release for our FOX subscribers. Both releases have the same functionality. The compiler in the release for FOX subscribers is somewhat faster. Some highlights of this build:

Compiler

  • We have made some optizations in the Lexer which make the compiler somewhat faster
  • Fixed a problem with /vo2 (initialize strings with "") so parent class constructors will no longer overwrite fields that are already assigned in subclasses. We still recomment that you call the parent constructor first before assigning field values
  • Fixed a problem with /vo16 (automatic clipper constuctor generation). This was not working for classes that inherit directly from classes defined in referenced assemblies.
  • Improved the debugger breakpoint generation. The compiler no longer generates 'hidden' breakpoint information for startup and closedown code in the VO/Vulcan dialects, and for expression statements no longer a double step is necessary.
  • The compiler now generates a warning when you use the #pragma command.
  • In some situations (partial classes where access and assign are not both in the same source file) the compiler would generate error messages without proper file name and line number. This has been fixed.

 

Visual Studio Integration

  • Performance improvements in the source code editor and the background parsing at solution open time
  • We have added support for the Object Browser and Class browser. These may be used as replacements for the VO Repository explorer
  • Matching keywords are now be hightlighted in the editor
  • If you select an identifier all similar identifiers in the same entity are highlighted
  • We have added several features that you need to enable/disable on the Tools/Options/Text Editor/XSharp/Intellisense dialog:
    • The code completion in the editor also supports instance member completion when a dot is pressed.
      Please note that the compiler ONLY accepts this in the Core language, not in the VO & Vulcan dialect. So the option has no effect inside projects with other dialects.
    • We have added some options to control the sorting of the DropDown comboboxes in the editor, as well as if fields/instance variables should be included in these comboboxes.
      When you do not sort, then the entries in the dropdown box will be shown in the order in which they are found in the source file.
    • We have added the option to autocomplete identifiers when typing. This includes locals, parameters, class fields, namespaces, types etc. If you have a large project and/or a slow machine you may want to disable this feature. It is disabled by default.
  • Properties and methods in the generated source files for XAML code (the .g.prg files in the OBJ folder) are now also parsed and included in the completion lists in intellisense and in the Class Browser and Object Browser windows.

This new version is available for download for both FOX subscribers as wel as the general public from the download pages on this website.

Comments   

#6 Rene J. Pajaron 2018-03-23 16:04
Quoting Karl Faller:
Rene,
you mean this (from Help - conditional access:
LOCAL oEmptyPerson as Person
LOCAL sName as STRING
oEmptyPerson := GetAPerson()
sName := oEmptyPerson?:FirstName // Conditional Access: This will not crash, even when Person is a NULL_OBJECT
? sName DEFAULT "None"

HTH
Karl


Hi Karl,

Yes, that is what I mean. And thanks, because I found this also in online help as well: https://www.xsharp.info/help/conditional-access-expression.html

--

Rene
#5 Karl Faller 2018-03-23 15:54
Rene,
you mean this (from Help - conditional access:
LOCAL oEmptyPerson as Person
LOCAL sName as STRING
oEmptyPerson := GetAPerson()
sName := oEmptyPerson?:FirstName // Conditional Access: This will not crash, even when Person is a NULL_OBJECT
? sName DEFAULT "None"

HTH
Karl
#4 Rene J. Pajaron 2018-03-23 14:50
Hi Robert,

Thanks for adding this new features. Got spoiled by C#'s IntelliSense that sometime I struggled to fight it. I remember in Sidekick era where there are auto formatting.

I will download this past midnight to get full assurance to get full speed. Kids at home are using my bandwidth like crazies.

Anyway, I am heavy user of this code shortcut:

rather than typing:

If (this.Thing != null)
this.Thing.DoThis()

We could just write this:
this.Thing?.DoThis()

Already in X#?
This saves lot of lines and make code compact. If it does supported, then I really need to read a lot of X# docs.

Regards,

Rene


Quoting Robert van der Hulst:
Rene,

The source formatting when the Enter key is pressed is part of this release.

Robert
+1 #3 Robert van der Hulst 2018-03-23 14:05
Rene,

The source formatting when the Enter key is pressed is part of this release.

Robert
#2 Rene J. Pajaron 2018-03-23 14:00
I have a hard time downloading it. I will try this again tonight (5x already).

One more thing, is there a switch to turn to make source editing to auto format. For example, typing ENDIF will tabify it to right position in line with IF, just like we have in VO or C#.
+1 #1 Wolfgang Riedmann 2018-03-23 09:07
Installed and running! Thanks to the team!

You need to login to post comments on this website.