Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Incorrect underlining in C++/VS2005

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
gbozoki Posted - Nov 24 2006 : 01:57:27 AM
Hi guys,

I have this code in a simple Windows console application:

#include <stdlib.h>
#include <stdio.h>
#include <tchar.h>

int _tmain ( int argc, _TCHAR* argv[] )
{
    srand ( 3 );
    int i = rand ();
    
    printf ( "i: %d\\n", i );
    
    return ( 0 );
}

and rand() is underlined with a wavy red line that indicates that the symbol is wrong. The above code compiles without problems and I get the underlining even after. I have the VAX option "Underline mistyped symbols using..." checked.

On an unrelated note, I seem to have an autotext problem as well: I have the autotext entry (...) defined as "( $selected$ )", without the quotation marks. Note the extra space. When I then select something and press '(', the selection is enclosed in parenthesis, but the spaces are left out. So instead of this:
( 3 )

I get
(3)

Is there anything that would fix this - it's annoying, since I try to use this feature very frequently.

Thanks,
gbozoki
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 27 2006 : 08:32:02 AM
If you prefer the keyboard assign a keyboard shortcut, e.g. Ctrl+Alt+Num - to the command VAssistX.InsertAutotext

Now select the text, press the keyboard shortcut, and select the autotext entry you want. Since text is selected the initial list will only contain autotext rules that contain $selected$ somewhere inside the code block.

You can re-order the items in the edit autotext dialog, and they should be listed in the same order that they appear in the autotext dialog, so you can place the one you want at the top of the menu.
jpizzi Posted - Nov 27 2006 : 12:30:23 AM
You can't use autotext entries with $selected$ by typing a shortcut because once you type the shortcut, the text is no longer selected. In fact, without the VA feature enabled, you have replaced the selected text with the typed character!

Best you can hope for right now is to invoke the autotext entry via the menus (shift-right-click will work), or use the VA feature and add the spaces.
gbozoki Posted - Nov 25 2006 : 7:11:48 PM
Feline,

Thanks for your reply. For the surround option, I guess I use the VAX feature (it's checked.) I also have an autotext entry for that, but no listbox appears when I select something and press '('. When I uncheck the VAX option and try to rely on the autotext entry, a listbox appears and it offers the '( ... )' entry, but the selection is deleted and only an empty parenthesis is inserted. So when I select 'TRUE' in the code and press '(', the autotext appears but I end up having

( | )

instead of

( TRUE| )

Here is how the entry is defined in autotext:

Name: ( ... )
Shortcut: (
Code: ( $selected$$end$ )

Is there anything to do about this? I use the surround feature 100+ times a day - it's very inconvenient to constantly type in the extra spaces. It'd be nice to have an additional option on the VAX UI for the option to insert additional spaces like there is one for insert closing parenthesis.

Thanks,
gbozoki
feline Posted - Nov 24 2006 : 10:17:26 AM
I am seeing the same problem here with rand(). Interestingly this happens in VS2005, but not in VS2003. Something about how the system headers have changed between the two IDE's.

case=3777

For the brackets, are you triggering autotext, or are you just using VA's feature to surround text when you type a bracket?
Are you seeing a menu or list of options, or just typing and it happens?

If you are not interacting with autotext then the autotext rule will not apply.
If you are keyboard focussed you may want to bind a keyboard shortcut to the command VAssistX.InsertAutotext

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