fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: XSharp Integration in VS 2019

XSharp Integration in VS 2019 24 Apr 2020 11:46 #14190

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • 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:

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

    Last edit: by leon-ts.

    XSharp Integration in VS 2019 24 Apr 2020 12:59 #14195

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • 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.
    XSharp Development Team
    chris(at)xsharp.eu

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

    XSharp Integration in VS 2019 24 Apr 2020 13:08 #14196

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • 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

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

    Last edit: by leon-ts.

    XSharp Integration in VS 2019 24 Apr 2020 13:31 #14198

  • robert's Avatar

  • robert


  • Posts: 1746
  • Chris,

    No it is the
    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

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

    XSharp Integration in VS 2019 24 Apr 2020 13:44 #14200

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • XSharp Development Team
    chris(at)xsharp.eu

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

    Last edit: by Chris.

    XSharp Integration in VS 2019 24 Apr 2020 13:44 #14201

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Robert, Chris,

    A similar problem is also observed in the following construction:
    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

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

    XSharp Integration in VS 2019 24 Apr 2020 13:45 #14202

  • robert's Avatar

  • robert


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

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Integration in VS 2019 24 Apr 2020 13:48 #14203

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • Thanks Leonid, this is now logged as well: github.com/X-Sharp/XSharpPublic/issues/368
    XSharp Development Team
    chris(at)xsharp.eu

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

    XSharp Integration in VS 2019 24 Apr 2020 13:49 #14204

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


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

    Chris, thanks!

    Best regards,
    Leonid

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

    Last edit: by leon-ts.

    XSharp Integration in VS 2019 24 Apr 2020 19:20 #14219

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • 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):
    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 "XSharp\Intellisence\Commit 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:
    {}[]().,:;+-*/%&|^!~=<>?@#'"\
    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

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

    Last edit: by leon-ts.

    XSharp Integration in VS 2019 24 Apr 2020 20:10 #14220

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • XSharp Development Team
    chris(at)xsharp.eu

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

    XSharp Integration in VS 2019 27 Apr 2020 12:11 #14259

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Hi devteam!

    When the "Show Completition list after character is typed" setting is turned on, there are very strong and frequent delays when entering text - the editor freezes for a while (from 3 to 10 seconds). Is there any way to improve the performance of this functionality? When the setting is off, input works without freezes, but ceases to be convenient.

    P.S. Computer is powerful: 3GHz processor, 64GB RAM, RAID-0 disk (2x NVMe M.2).

    Best regards,
    Leonid

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

    XSharp Integration in VS 2019 27 Apr 2020 15:14 #14262

  • Chris's Avatar

  • Chris


  • Posts: 1957
  • Hi Leonid,

    I am afraid for now you just need to keep this off, it is a known issue that with some solutions/projects it causes delays. This option has remained enabled only for those cases where it does not affect performance, in certain projects/solutions again.

    Unfortunately I can't give you a timeframe for making it always work flawlessly either, because it is a very tricky area thing to get right.
    XSharp Development Team
    chris(at)xsharp.eu

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

    XSharp Integration in VS 2019 27 Apr 2020 15:24 #14264

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Chris, thanks for the answer!
    I understand, optimization of some things is often a non-trivial task. We will look into the future with hope :)
    I really hope that you will have some ideas for overcoming this problem.

    Best regards,
    Leonid

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

    XSharp Integration in VS 2019 28 Apr 2020 16:09 #14283

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Hi devteam!

    Found a strange exception in debug mode (XSharp in VS 2019) when working with the "DATE" type.
    Wrote the simplest example:
    FUNCTION Start() AS VOID STRICT
        LOCAL d AS DATE
        d := ConDate(2020, 04, 28)
        RETURN
    When executing the line "d := ..." step by step, an exception occurs:

    System.Threading.ThreadAbortException

    I can not understand why this is happening?

    P.S. Project type: VO Console Application (with default settings)

    Best regards,
    Leonid

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

    Last edit: by leon-ts.

    XSharp Integration in VS 2019 29 Apr 2020 08:43 #14287

  • robert's Avatar

  • robert


  • Posts: 1746
  • Leonid,
    I can reproduce this with both VS2019 and VS2019 preview. In Vs2017 it works as expected.
    The problem is either in the VS debugger or our debugger support.
    When you compile with VS2019 and then open the produced EXE as solution in VS2017 (did you know that you can do that ?) and then start the debugger then everything works as expected.

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Integration in VS 2019 29 Apr 2020 09:16 #14288

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Robert,

    Can I write this problem on GitHub as an error when working in VS2019?

    P.S. I don't have VS2017 and I don't plan to use it.

    Best regards,
    Leonid

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

    XSharp Integration in VS 2019 29 Apr 2020 09:17 #14289

  • robert's Avatar

  • robert


  • Posts: 1746
  • Leonid,
    Yes please create a ticket, so we will not forget this.

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Integration in VS 2019 29 Apr 2020 18:12 #14295

  • robert's Avatar

  • robert


  • Posts: 1746
  • Leonid,
    It took a while but I found it.
    We have added a [DebuggerDisplay()] attribute to the Date type. In this attribute we are calling DTOC() to format the date according to your current settings. This accesses the runtime state
    It looks like VS 2019 evaluates this on another thread than the current thread and this seems to cause the error.
    We will fix this in the interim build that is planned for next week.

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Integration in VS 2019 29 Apr 2020 18:57 #14296

  • leon-ts's Avatar

  • leon-ts

  • Topic Author


  • Posts: 87
  • Robert, thanks!

    Best regards,
    Leonid

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

    • Page:
    • 1