Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Pick suggestion issue in snippet

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
leto58 Posted - Aug 12 2019 : 05:34:46 AM
Hi,

I created the following VA snippet (using shortcut "cte"):
EntityPointer<I$EntityType$> p$EntityType$ = CreateTestEntity<I$EntityType$>([](I$EntityType$* p$EntityType$) {
p$EntityType$-$end$;
});

- I type "cte" and <enter>: the following snippet template is written in the editor, and the focus is set on the first "EntityType" occurrence, as expected:
EntityPointer<IEntityType> pEntityType = CreateTestEntity<IEntityType>([](IEntityType* pEntityType) {
					pEntityType-;
				});


- I begin to type, and VA suggestions or intellisense proposes items to choose, as in normal edition

What I get: when I pick one suggestion while the parameter currently in edition is partially written, this one is properly updated with the suggestion, but all other occurrences are replaced with the partial text I typed. (all this happens in a single operation, when I hit <enter> to pick the suggesion)





What I expect: when I pick one suggestion while the parameter currently in edition is partially written, this one is properly updated with the suggestion, and all other occurrences are replaced with the suggestion as well.

Strangely enough, I created another snippet, where I get the expected behaviour:
$EntityType$Table& $EntityType$ = ($EntityType$Table&)query[EntityType::$EntityType$];


I can see in this last case, that the 2 operations are done separatly; I need to press <enter> once to replace the 1st parameter with the suggestion, and <enter> a second time to propagate this replacement to all other occurrences.

I noticed also that in the second snippet, the parameter i a whole world $EntityType$, while in the first one, the parameter is next to the letter I: I$EntityType$ . If I remove the "I" in front of the first parameter, the first snippet works as expected (but I need this 'I', and think it is nagging to have to type it after each time).

Regard,
Leto
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 12 2019 : 07:46:35 AM
Thank you for the clear description, I am seeing the same problem here and I have put in a bug report for this:

case=141081

The work around, which is irritating, but works, is to type the full symbol name, ignoring the listbox. Then what is inserted for the following placeholders is correct. I am sure you have already worked this out though.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000