Author |
Topic |
|
zot
New Member
5 Posts |
Posted - May 20 2005 : 05:31:46 AM
|
VAX seems to be a bit too clever for its own good.
99% of the code I type is within a very limited scope - most of the symbols I want it to suggest/autocomplete are: + Local variables + Local function parameters + Class (or parent class etc) members
However, it has some irritating habits which stop it working for a rather high number of cases:
1) I have a class with methods GetUserName(), GetUserDescription() and GetUserID(). If I type Get then VAX suggests GetUserName and GetUserDescription, but not GetUserID. I have to type GetUserI before VAX will suggest GetUserID. This is irritating because I know the method is there, and VAX seems to like hiding the one method of my class that I actually want! I would far rather that it showed *all* matching method names from the current scope/class, rather than 9 out of 10 of them. I don't quite understand why it chooses to hide or show these nearly identical symbols.
2) VAX seems to assume that all my code is perfectly formed all the time, so the slightest syntax error anywhere in my file seems to break autocomplete. I often add several lines of code before I compile it and fix any syntax errors, so VAX is often rendered useless by things as simple as a missing semicolon or mismatched brackets... Here's a contrived but effective example:
Type: if ( MyClass pThisWontWork; pThis
Because of the syntax error on the first line, VAX will never suggest "pThisWontWork" - it often waits until I finish typing this all out the long way and then replaces it with an obscure Windows constant that shares about 3 characters in common with the name I typed :-(
I realise that syntax errors make parsing impossible to get right 100% of the time, but even something as simple as adding any valid identifier tokens from the preceeding lines to the end of the suggestion list would resolve many cases of this probem.
I know many others will disagree with me, but I'd personally like a suggestion list that either: * Only uses a local scope (symbols from this class hierarchy and the current method) for suggestions, and then shows global/other scope symbols if I hit ctrl+space, or...
* Prioritises the suggestion list by its locality, so the closer it is to the current scope, the higher up the list it is. i.e. A matching variable declared on the line above would be listed first, then any parameters to the method, then any class members, then any parent class members, (etc) ... and then all the windows header junk.
Forgive me if I've simply missed any preference options that would resolve my issues...
Cheers, Zot
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - May 20 2005 : 06:29:40 AM
|
quote: Originally posted by zot
Forgive me if I've simply missed any preference options that would resolve my issues...
Could be, but before we can judge your options set, we need to know which options you enabled.
|
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - May 20 2005 : 09:04:00 AM
|
If you have acronyms turned on, you can just type GUI to get GetUserID(). This is particularly useful in situations like yours where you have lots of similar names. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
zot
New Member
5 Posts |
Posted - May 20 2005 : 10:13:17 AM
|
Cheers guys.
"Listboxes": All options checked
"Suggestions": Display suggestion list checked. Include bits of code/Include autotext unchecked
I have acronyms turned on, but when VAX (frequently) fails to autocomplete, acronyms then have to be painstakingly deleted and replaced by hand with the full symbol name - more work than not using VAX at all. So I tend to type the beginning of the name so that when it fails, it's merely irritating rather than actually wasting my time.
Anyway, my key point is that if I type something clearly recognisable to VAX, it's really irritating when it isn't displayed in the suggestions. Ideally, if I type "Get" then the first basic thing it could do is list all the things in my class that start with "Get", before it starts getting clever with intellisense and acronyms etc.
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - May 20 2005 : 11:50:13 AM
|
I really wouldn't want it to list everything in the class that begins with "Get". There are far too many of them. It's much better that it only lists a few until I've typed some more letters. And with acronyms/shorthand, you can disambiguate using some characters from the end, so you get the best of both worlds.
|
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - May 20 2005 : 11:53:07 AM
|
And you do know that Ctrl-Space forces a completion listbox which is supposed to contain all possible completions, do you?
|
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
feline
Whole Tomato Software
United Kingdom
19014 Posts |
Posted - May 20 2005 : 2:47:44 PM
|
in addition to using ctrl+space to get a full list you may want to force a manual reparse of your files if you are getting a lot of problems. VA reparses the file when the system is idle, so it does not impact you. however the side effect is that if you are constantly typing the reparse does not get chance to run, so any new variables are not picked up.
i have assigned CTRL+ALT+NUMBER_PAD_PLUS to the command VAssistX.ReparseCurrentFile and this works very well for me. i just hit this when i feel VA is behind the times.
i often have code that does not compile, and errors when i try to compile it the first time, but VA quite happily suggests sensible things for me. sometimes its suggestions are just weird, but this is rare. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|