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
 Smart Suggestions went wild
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
1778 Posts

Posted - Mar 10 2020 :  07:59:37 AM  Show Profile  Reply with Quote
Really no idea what happened here...

The type of "Folders" is List<string>, so it should suggest it (as it did correctly for the "Files" right above)







feline
Whole Tomato Software

United Kingdom
16409 Posts

Posted - Mar 10 2020 :  11:55:36 AM  Show Profile  Reply with Quote
That's different...

On the line above, the "Files" line, it ends with a comma. Is this deliberate? This doesn't look like valid syntax to me, but you might well be doing something that I am not used to. If this is a mistake, if you replace the comma with a semi-colon, and give VA a moment to catch up, does this change the suggestion for "Folders"?

I am wondering if the line above is confusing our parser, resulting in this rather unhelpful suggestion.

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

Uniwares
Tomato Guru

Portugal
1778 Posts

Posted - Mar 10 2020 :  12:11:41 PM  Show Profile  Reply with Quote
Its a valid initializer. Files and Folders are members of the BackupPlanFilesAndFolders class, thus they are initialized inline.

	x.FilesAndFolders = new List<BackupPlanFilesAndFolders>
	{
		new BackupPlanFilesAndFolders()
		{
			Files = new List<string>(),
			Folders = new List<string>()
		}
	};

is equivalent to
	x.FilesAndFolders = new List<BackupPlanFilesAndFolders>();
	x.FilesAndFolders.Add(new BackupPlanFilesAndFolders());
	x.FilesAndFolders[0].Files = new List<string>();
	x.FilesAndFolders[0].Folders = new List<string>();

The (simplified) class definition:

class BackupPlanFilesAndFolders
{
	public List<string> Files;
	public List<string> Folders;
}


Maybe the fact that its an inline initializer inside an inline initializer (List<> and the class) but that actually shouldnt make any difference, after all its normal use.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16409 Posts

Posted - Mar 10 2020 :  2:49:27 PM  Show Profile  Reply with Quote
Thank you for explaining, I have reproduced this here now. Trying to pin down the extent of the problem now.

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

feline
Whole Tomato Software

United Kingdom
16409 Posts

Posted - Mar 11 2020 :  1:33:44 PM  Show Profile  Reply with Quote
I think this is caused by us not properly understanding the C# syntax here, so I have put the examples into:

case=962

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

Uniwares
Tomato Guru

Portugal
1778 Posts

Posted - Mar 11 2020 :  1:36:20 PM  Show Profile  Reply with Quote
Yeah, C# is changing faster than Smartphone technology, hahahahahaha.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16409 Posts

Posted - Mar 12 2020 :  06:41:14 AM  Show Profile  Reply with Quote
The problem with the C# initializers is actually covered by

case=24121

and we are hoping to have a fix fairly soon, but I don't currently have a solid estimate for when.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000