XSharp Integration in VS 2019

This forum is meant for questions and discussions about the X# language and tools
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

XSharp Integration in VS 2019

Post by leon-ts »

Hi devteam!

I found a problem while editing XSharp code in VS 2019. In the attachment is a screenshot with a visual description of the problem. A further attempt to select a method (typing "oColumn:") displays a list of members of the DataColumnCollection class instead of the DataColumn class.

Best regards,
Leonid
Attachments
screenshot1.jpg
screenshot1.jpg (27.42 KiB) Viewed 656 times
Best regards,
Leonid
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XSharp Integration in VS 2019

Post by Chris »

Hi Leonid,

Do you mean you already have a local (var) named oColumn and then in further nested code you declare another variable with the same name? This is not allowed and the compiler would give you an error anyway.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

XSharp Integration in VS 2019

Post by leon-ts »

Hi Chris,

Variables are named differently. The first is in the plural (oColumnS), and the second is in the singular (oColumn without S).

Addition: This code compiles and works. The problem is only with the code editor in VS 2019. I have the same problem with any variable names. It's not about the name.

Best regards,
Leonid
Best regards,
Leonid
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

XSharp Integration in VS 2019

Post by robert »

Chris,

No it is the

Code: Select all

VAR oColumn := oColumns[i-1]

where our VS intellisense engine thinks that oColumn has the type of the collection and not the type of the element in the collection. I think Fabrice has to look into this.
Can you make a ticket and assign this to Fabrice ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XSharp Integration in VS 2019

Post by Chris »

Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

XSharp Integration in VS 2019

Post by leon-ts »

Robert, Chris,

A similar problem is also observed in the following construction:

Code: Select all

LOCAL o AS OBJECT // for sample only
IF o IS DataTable VAR oDataTable
	// some actions with oDataTable
ENDIF
Variable oDataTable is out of sight of Intellisence.

Best regards,
Leonid
Best regards,
Leonid
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

XSharp Integration in VS 2019

Post by robert »

Leonid,
That is a new syntax that we have overlooked in the VS integration.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

XSharp Integration in VS 2019

Post by Chris »

Thanks Leonid, this is now logged as well: https://github.com/X-Sharp/XSharpPublic/issues/368
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

XSharp Integration in VS 2019

Post by leon-ts »

Robert, this syntax is very convenient and I began to use it often. Thanks!

Chris, thanks!

Best regards,
Leonid
Best regards,
Leonid
leon-ts
Posts: 435
Joined: Fri Feb 03, 2017 1:43 pm

XSharp Integration in VS 2019

Post by leon-ts »

A few more issues editing XSharp code in VS 2019.

1. In an expression with several nested function calls, Intellisence displays the parameters of the previous function.
Еxample (invalid, for demonstration only):

Code: Select all

LOCAL c AS STRING
c := RTrim(Str(Val("1")))
When I enter the opening bracket after "RTrim(" the parameters of the "RTrim" function are shown to me, everything is correct. Then I continue to type "Str(" and after the opening bracket I see again the parameters of the "RTrim" function, which is already wrong. Next, I continue to type "Val(" and after the opening bracket, the parameters of the "Str" function are shown to me, which is again wrong. That is, each time the next function is entered, the parameters of the function in front of it are displayed. With the same incorrect effect, hovering mouse over any function in the expression - it displays tooltip from the function located in front of it.

2. The setting "XSharpIntellisenceCommit completition list by typing ..." is not saved if you specify an empty line in the input field. After restarting VS 2019, this setting restores the default value:

Code: Select all

{}[]().,:;+-*/%&|^!~=<>?@#'"
I need autocompletition from combobox only by explicitly selecting an item and pressing Enter. To do this, I deleted all the characters in the above setting. But after restarting VS 2019, the setting is restored. At the same time, the completion is still performed on some characters (for example, the closing bracket), even if not a single character is specified. If I specify any useless character in this setting, then input completion works correctly (only by Enter).

Best regards,
Leonid
Best regards,
Leonid
Post Reply