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
 Incorrect underlining in C++/VS2005
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gbozoki
Ketchup Master

USA
70 Posts

Posted - Nov 24 2006 :  01:57:27 AM  Show Profile  Reply with Quote
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

Edited by - gbozoki on Nov 24 2006 01:59:07 AM

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 24 2006 :  10:17:26 AM  Show Profile  Reply with Quote
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

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

gbozoki
Ketchup Master

USA
70 Posts

Posted - Nov 25 2006 :  7:11:48 PM  Show Profile  Reply with Quote
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

Edited by - gbozoki on Nov 26 2006 1:36:57 PM
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Nov 27 2006 :  12:30:23 AM  Show Profile  Reply with Quote
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.

Joe Pizzi

Edited by - jpizzi on Nov 27 2006 12:30:37 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Nov 27 2006 :  08:32:02 AM  Show Profile  Reply with Quote
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.

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