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
 [1736] Insert VA Snippet menu hot keys
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdrianS
Senior Member

Canada
31 Posts

Posted - Oct 02 2009 :  08:12:02 AM  Show Profile  Reply with Quote
Is it my imagination or has the order that snippets are chosen from the Insert VA Snippet menu changed when a hot key is used?

For example:
* select some C++ code
* Alt+S to open the Inert Snippet menu
* type t

In my menu, the C++ try/catch snippets appear above the MFC TRY/CATCH snippet and all have a t hot key. The TRY/CATCH is inserted by the above example. My recollection is that, prior to 1736, the first menu item with a particular hot key was used, rather than the last.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 02 2009 :  2:29:33 PM  Show Profile  Reply with Quote
Do you have any idea what version of VA you used to use? I am seeing the same behaviour you describe, but I am also seeing it in VA 1731 and VA 1727. If this is a regression then it is a higher priority bug, so it would be useful to find out one way or the other.

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

AdrianS
Senior Member

Canada
31 Posts

Posted - Oct 02 2009 :  3:15:48 PM  Show Profile  Reply with Quote
I'm pretty sure that it was choosing the first hot key item in 1735. However, I rolled back to 1735 and it's now choosing the last item. Either my memory is faulty or something has changed in the setup after 1736 was installed. I'm seeing the same effect on two systems.

I'm pretty sure that it did select the first item in 1735, though, because I use Alt+S then hot key to insert comment blocks and the comments from mid September are the correct snippet.

It's not a major problem, since I can work around it by reordering my snippets.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 03 2009 :  2:09:04 PM  Show Profile  Reply with Quote
I have put a bug report in for this, since as you say, we both expect the first item with "t" underlined to be selected and inserted:

case=33154

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

AdrianS
Senior Member

Canada
31 Posts

Posted - Jan 28 2010 :  06:12:36 AM  Show Profile  Reply with Quote
Is it just me or has this behaviour changed yet again. I see no mention of this topic or the case in the change history, though.

As before, if multiple snippets start with the same letter, they all get the same accelerator. Now, instead of the last snippet being chosen by the accelerator, the menu selection just cycles through the snippets. To see what I mean, try my original example from the beginning of this topic.

At least one extra keystroke is now required, and that key (Enter) is at the opposite end of the keyboard from Alt+S.

Perhaps what is needed is a way to define what accelerator, if any, a snippet should get. Or, at least a way to suppress the accelerator for a snippet.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 28 2010 :  6:17:06 PM  Show Profile  Reply with Quote
I can confirm the change of behaviour, I am seeing the same change here.

I am not sure what to say about this. The normal method for specifying the accelerator is to use & in the string. But adding & to the shortcuts or bodies of VA snippets is going to cause problems. We might have to add an extra field for every snippet for the keyboard shortcut in the menu. Personally I dislike this, since the menu behaviour is likely to change quite a lot when you add the first accelerator.

The list of all possible VA Snippets is not ideal for quick keyboard access, since the list can be quite long. This is why the Snippets have shortcuts, for direct access with the keyboard.

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jan 28 2010 :  8:37:53 PM  Show Profile  Reply with Quote
Yes this changed. The insert menu now behaves like a standard Win32 menu in that multiple items with the same mnemonic are cycled through - instead of a commit on an arbitrary (first or last) hit.

In addition, tab will now commit the selected item. Still an extra keystroke, but on the same side as your Alt+S.

This changed independently of case=33154 for other reasons.
Go to Top of Page

AdrianS
Senior Member

Canada
31 Posts

Posted - Jan 29 2010 :  10:12:30 AM  Show Profile  Reply with Quote
feline:
quote:
This is why the Snippets have shortcuts, for direct access with the keyboard.

In this case, the snippets that I'm trying to access all include selections.

For now, I'm going to either add an extra letter (e.g. 'x') to the beginning of the title for snippets that I don't want accelerator access to to or I'll add a number to the beginning.

sean:
quote:
behaves like a standard Win32 menu

I realize that, but in most cases one has more control over what the accelerators are so the cycling can be avoided.

Thanks for the Tab suggestion - that will help
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Feb 18 2010 :  12:55:39 PM  Show Profile  Reply with Quote
case=33154 is fixed in build 1812

Whole Tomato Software, Inc.
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