BUG - VS intellisense causes hard freeeeeeze...

This forum is meant for questions about the Visual FoxPro Language support in X#.

Anonymous

BUG - VS intellisense causes hard freeeeeeze...

Post 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


User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

BUG - VS intellisense causes hard freeeeeeze...

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

BUG - VS intellisense causes hard freeeeeeze...

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
FoxProMatt

BUG - VS intellisense causes hard freeeeeeze...

Post 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 581 times

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

BUG - VS intellisense causes hard freeeeeeze...

Post 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 581 times
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

BUG - VS intellisense causes hard freeeeeeze...

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
FoxProMatt

BUG - VS intellisense causes hard freeeeeeze...

Post 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 581 times
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

BUG - VS intellisense causes hard freeeeeeze...

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
FoxProMatt

BUG - VS intellisense causes hard freeeeeeze...

Post 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.
FoxProMatt

BUG - VS intellisense causes hard freeeeeeze...

Post 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.
Post Reply