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
 Feature Requests
 Anoying auto formating
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Alexis Pautrot
Junior Member

21 Posts

Posted - May 25 2011 :  09:16:56 AM  Show Profile  Reply with Quote
Hi !

The auto completion of writing "pObject -> MyMethod()" (notice space around ->) removes the latest space, and screw the formatting I'm using, which is really really anoying.

Could VA only do what it is supposed to ? Auto completing code, but NOT auto formating anything ?

Seems like a bug to me.

Thank you !

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 25 2011 :  12:28:33 PM  Show Profile  Reply with Quote
I wasn't able to reproduce the problem here. Are you just writing the code or do you accept the suggestion? I tried both on this code:

class cTest {
public:
	int Method() {}

};

void Func()
{
	cTest* pObject;
	pObject -> Method();
}


Can you please try if you can reproduce the problem in a clean new test project using the above code? I am wondering if is this something project specific or caused by a setting or whether we do exactly same thing when typing or not.
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - May 31 2011 :  04:37:38 AM  Show Profile  Reply with Quote
Me neither, I can't reproduce it in a new project. And I'm also unable to reproduce it in our current project.

When it happened, I was writing first letters of method's name, then hitting enter to accept suggestion. I was more or less used to this behaviour of eating the last space because VAssist did it since so long (I even can't remember it working) that I was sure it was a wanted behaviour.

I did a Rebuild symbol database and a Clear cache history two days ago after added some macro to stdafx.h in C:\\Program Files\\Visual Assist X\\Misc. I don't know if there is a possible side effect.

Now I know it should not happen I will try to track it next time it happens, and give you as much info I will have in order to reproduce it.

Thanks you.
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - May 31 2011 :  05:38:33 AM  Show Profile  Reply with Quote
Ok I finally found it, here are the steps to reproduce.

I'm using a VB macro in order to write " -> ", which is :

Sub Indirection()
ActiveDocument.Selection.text() = " -> "
End Sub

I have binded it to CTRL ALT '+'.

When I use this macro, " -> " is inserted, then the suggestions box pops up and if I choose any, the last space is eaten.

I will try to change my macro to avoid this side effect but could you glance at it ? Thank you.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 31 2011 :  8:06:21 PM  Show Profile  Reply with Quote
Brilliant discovery! I was able to reproduce the problem using a bound macro:

case=57809
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - Oct 12 2011 :  08:07:11 AM  Show Profile  Reply with Quote
Hi again !
How can I follow this case 57809 ?
I guess I'm probably the only one who is annoyed by it, but I'm still hoping you will resolve it in the following releases.

Thank you in advance ! Bye !
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 13 2011 :  2:16:53 PM  Show Profile  Reply with Quote
Unfortunately no progress yet on this, but it is still in our list of bugs to fix. I have increased the priority on this bug for you, hopefully this will help a bit.

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

Alexis Pautrot
Junior Member

21 Posts

Posted - Oct 14 2011 :  05:55:32 AM  Show Profile  Reply with Quote
Thank you Feline, this is really kind :)
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - Aug 13 2012 :  03:49:51 AM  Show Profile  Reply with Quote
Hello

Still not reached the top of the list ? :)

I couldn't find a workaround for this one. Can you simply tell me if there is a chance for it to be corrected or if it is too uncommon to be treated ?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 13 2012 :  6:12:28 PM  Show Profile  Reply with Quote
Unfortunately no progress yet to report on this, and this is quite a specialised effect, so fixing this is not going to help many people. I don't know which IDE you are using, but Visual Studio 2012 no longer supports macros, so you won't be able to use this technique as and when you upgrade to this IDE.

Have you considered using a code formatting tool, to change "->" into " -> "? I am not sure if this would be an option, but it might be. This is a commercial code formatting tool that looks good, but I have never used it personally, so I am not sure quite what it can do.

http://www.profactor.co.uk/stylemanager.php

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

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Aug 14 2012 :  12:28:20 AM  Show Profile  Reply with Quote
Alexis, have you tried allowing Visual Assist X to insert the -> operator for you by typing a dot after your pointer?

VA Options | Advanced | Corrections | Convert dot to -> (in C/C++)

There's an additional option to convert dot to -> if operator -> is overloaded, which is convenient when using smart pointers.

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - Aug 14 2012 :  04:13:42 AM  Show Profile  Reply with Quote
I don't think "Convert dot to" will help me on that, because my formatting is like this :

MyClass* pClass = new MyClass();
pClass -> DoSomething ( 5, "babla", ( 15.0f + 2.0f ) );
pClass -> GetData() -> GetCount();
...

I'm using a lot of spaces everywhere. And because, typing " -> " is too long, I'm using a macro that write " -> " associated to a shortcut of one key.

Maybe it's time for me to stop putting all these spaces everywhere :)

Thank you anyway.
Go to Top of Page

Alexis Pautrot
Junior Member

21 Posts

Posted - Aug 14 2012 :  04:26:43 AM  Show Profile  Reply with Quote
Oh thank you so much Feline for the link ! This tool seems wonderful !!!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 15 2012 :  11:33:18 AM  Show Profile  Reply with Quote
I am glad you are finding this useful, I hope it helps you

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