xsharp.eu • BUG - VS intellisense causes hard freeeeeeze...
Page 1 of 2

BUG - VS intellisense causes hard freeeeeeze...

Posted: Thu Oct 17, 2019 9:45 pm
by Anonymous
When I enter the (dot) character, othe (colon) at this point in the code, expecting to get an intellisense pop-up list of property or method names on the object (created as an instance of a class definition in the code), it causes VS 2019 to do a hard freeze for a long time,and will eventually kill the VS app.

Happens in VS2017 and VS2019.


Here is the code... Can someone do a test???

.

Code: Select all

Using System
Using System.Collections.Generic
Using System.Linq
Using System.Text

Using XSharp.Core
Using XSharp.VFP
Using XSharp.RT
Using XSharp.RDD

#include "dbcmd.xh"

Function Start() As Void Strict

	Var oObject = MyFirstClass{}

	oObject          <<----------- Type (dot) or (colon) here and VS will freeze.	


	Return .t.

End Function


//==============================================================
Define Class MyFirstClass As Custom

	Public cDbfName = "C:Worklm5AppDataxSharp_Test.dbf"

End Define



BUG - VS intellisense causes hard freeeeeeze...

Posted: Thu Oct 17, 2019 9:57 pm
by robert
Matt,

Problem confirmed.
There seems to be a serious problem with the intellisense in VFP mode inside VS. This may be related to the UDCs in dbcmd.xh.
I'll investigate this tomorrow and will come with a quick fix.

Robert

BUG - VS intellisense causes hard freeeeeeze...

Posted: Fri Oct 18, 2019 7:13 am
by robert
Matt,
This appears to be related to the type lookup for the VAR keyword. If you change

Var oObject = MyFirstClass{}

to

LOCAL oObject = MyFirstClass{} AS MyFirstClass

then the problem is away.

Robert

BUG - VS intellisense causes hard freeeeeeze...

Posted: Fri Oct 18, 2019 8:15 pm
by FoxProMatt
Robert -

I changed to LOCAL as you suggested, but now when I type the (dot) after loObject, it does not show the cFilename Public property that is defined on the class.


I even tried PUBLIC PROPERTY, and still no lock, and I tried a (colon) and I get a whole long list of things, but still not the Publid cFilename property.


Dot:
2019-10-18_15-13-37.png
2019-10-18_15-13-37.png (26.46 KiB) Viewed 320 times

Colon:
2019-10-18_15-18-02.png
2019-10-18_15-18-02.png (29.03 KiB) Viewed 320 times

BUG - VS intellisense causes hard freeeeeeze...

Posted: Fri Oct 18, 2019 8:42 pm
by FoxProMatt
Doh....

I had left off " As MyFirstClass" .

Then, with that in place (dot) does not give the property in the Intellisense list, but (colon) does.

At least I am getting somewhere with it now.
2019-10-18_15-41-58.png
2019-10-18_15-41-58.png (35.87 KiB) Viewed 320 times

BUG - VS intellisense causes hard freeeeeeze...

Posted: Sat Oct 19, 2019 7:15 am
by robert
In the 2.08 build you will have to enable an option to make the dot work. In the next build the dot will work automatically for the FoxPro dialect. Goto Tools-Options, Type "XSharp" in the edit control, select "Intellisense" in the tree and then there should be an option to enable code completion after the Dot.
In the next build this will only be valid for the Core dialect. The FoxPro dialect will always have completionlists after the dot.

Robert

BUG - VS intellisense causes hard freeeeeeze...

Posted: Mon Oct 21, 2019 10:46 am
by FoxProMatt
Robert - using 2.0.8.1/2.0.8a, while it no longer freezes, it also does not not give any intellisense pop-up list at all, either with (colon) or (dot).

I did turn on the Tools/Option feature to use (dot) as you said, but I noticed the descriptions says "Core only".

Is this code okay?:
.
2019-10-21_5-43-24.png
2019-10-21_5-43-24.png (14.39 KiB) Viewed 320 times

BUG - VS intellisense causes hard freeeeeeze...

Posted: Mon Oct 21, 2019 11:05 am
by robert
Matt,

This should give you the public properties and methods of MyFirstclass and its parent classes.
I don't know what is wrong, on my system this works.
What happens if you press Ctrl-J after the colon ?

Robert

BUG - VS intellisense causes hard freeeeeeze...

Posted: Mon Oct 21, 2019 11:51 am
by FoxProMatt
Rats. I still can’t get it to work. I installed the FOX download, and had the error,so I did a full reboot and still had the error, then I installed the from the public installer and now I still have the error.

When I press Ctrl+J, nothing happens either.

BUG - VS intellisense causes hard freeeeeeze...

Posted: Mon Oct 21, 2019 11:52 am
by FoxProMatt
I need to check and make sure that in my class the items are actually defined as public properties, and not just private fields.

I will study that further.