Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 interfering with writing LINQ expressions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Mar 03 2020 :  12:25:32 PM  Show Profile  Reply with Quote
When writing a linq expression, VA is quick to suggest anything for the "from" part, which of course isnt yet defined at all.

like:
var v = from c in dc.Computers select comp;

writing "from c" already pops up suggestions that would expand to anything containing "c" after pressing the spacebar. At this point, it is really "c" that I want which is defined later in the expression.

VA might want to be quiet sometimes...

feline
Whole Tomato Software

United Kingdom
18726 Posts

Posted - Mar 04 2020 :  04:37:18 AM  Show Profile  Reply with Quote
Testing with C#, using VS2019 and VA 2366.0, when I type this line, or a line like it, after "from" there is a listbox, but it only has partial focus. The current item has outline selection only, so it is not selected by space.

Are you seeing something else? Or are you also seeing a listbox that is just "this might be helpful"?

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Mar 04 2020 :  04:49:03 AM  Show Profile  Reply with Quote
Getting a completion box, space inserts the first selected item.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18726 Posts

Posted - Mar 09 2020 :  08:30:17 AM  Show Profile  Reply with Quote
Is this a timing problem? If you type slightly more slowly do you still get this problem, or does the listbox behave correctly?

Testing on a clean install of VA, using VS2019 and VA 2366.0, working in C#, I have tried several different combinations of VA settings, and so far I cannot reproduce this problem here.

So can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem.

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Mar 09 2020 :  08:41:12 AM  Show Profile  Reply with Quote
Doesnt seem to be a timing problem. In this case for example there is no "Computer" anywhere, except the table in the DBML context and the acompanying class. My Settings didnt change since last time, so if you happen to still have them, otherwise I can send them again.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18726 Posts

Posted - Mar 09 2020 :  11:35:26 AM  Show Profile  Reply with Quote
Still nothing. Trying to get close enough to have a sensible test, using VS2019 and VA 2366.0, I have imported both your VS2019 and VA settings. I have then created a new, default C# .NET (not .NET Core) console solution, and into the main .cs file I have placed the following code, which does compile, so long as the testing here line is either commented out or completed, just to make sure I have a sensible test:

class LinqPerson
{
	// Auto-implemented properties
	public string Name { get; set; }
	public int Age { get; set; }
}
class UniwareLinqTesting
{
	private List<LinqPerson> dc;

	public UniwareLinqTesting()
	{
		LinqPerson person1 = new LinqPerson() { Name = "Feline", Age = 21 };
		LinqPerson person2 = new LinqPerson() { Name = "Uniwares", Age = 22 };
		dc = new List<LinqPerson>() { person1, person2 };
	}

	private void UpdateNotification()
	{
		var queryReference = from somePeople in dc where (somePeople.Age > 17) select somePeople;
		// testing HERE
		var n = from c
	}
	static void Main(string[] args)
	{
	}
}

and this is what I am seeing:



with only partial focus in the listbox nothing is being inserted directly.

If you open VA's Find Symbol dialog, is the symbol "Computer" listed? I am not seeing a tomato icon in your listbox for "Computer", so I am wondering if this symbol is actually coming from VA.

Can you try the same simple test I am trying here and see if you get the same results I am getting, or a different result?

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2318 Posts

Posted - Mar 09 2020 :  12:10:44 PM  Show Profile  Reply with Quote
If you look closely there is a tomato behind the class icon in my screenshot. So, yes, VA knows the symbol and it shows in the Find Symbol dialog (there is another problem there but this deserves its own thread).
With your sample I can not repro the problem. Will have to find a reason in my real project.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18726 Posts

Posted - Mar 09 2020 :  12:30:16 PM  Show Profile  Reply with Quote
Looking more closely I can indeed see the tomato icon, I missed it at first.

Is this a file specific problem? I suspect that "Computer" being a known symbol is solution specific, but I doubt this is the trigger here.

If you turn Off:

VA Options -> Suggestions -> Enable Suggestion Lists

does this stop the short VA listbox from appearing in this situation, leaving you only with an IDE listbox with partial focus, similar to the one in my screen shot? In my tests, on my system, I sometimes get a VA suggestion listbox appear, but only for a second or so, before it is replaced with an IDE listbox with partial focus. This is happening even with your settings imported here.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000