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
 defined() in macros
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tailsu
Senior Member

37 Posts

Posted - Aug 31 2007 :  07:31:31 AM  Show Profile  Reply with Quote
VA properly shows 'defined' in the completion list, but for some reason the only thing that appears in the suggestions list is DefineDosDevice.

In an empty project try writing:
#if defined
and you'll see

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Aug 31 2007 :  08:35:24 AM  Show Profile  Reply with Quote
I would suggest adding an autotext entry, perhaps the shortcut #ifde and the code #if defined($end$)

A slight cheat, it is true, but still this should be a very effective solution.

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

tailsu
Senior Member

37 Posts

Posted - Aug 31 2007 :  08:44:53 AM  Show Profile  Reply with Quote
Should I write an auto-text entry for

#if !defined(AMI_LINGO_NAME) \ || !defined(AMI_LINGO_CHANNELS) || !defined(AMI_LINGO_DEFAULT_CHANNEL) || !defined(AMI_LINGO_CO_TRAITS) \ || !defined(AMI_LINGO_SOCKETS) \ || !defined(AMI_LINGO_OARCHIVE) || !defined(AMI_LINGO_IARCHIVE) \ || !defined(AMI_LINGO_CO_ENUMERATOR) \ || !defined(AMI_LINGO_INPUT_CO_ITERATOR) || !defined(AMI_LINGO_OUTPUT_CO_ITERATOR)

?

:)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Aug 31 2007 :  2:41:51 PM  Show Profile  Reply with Quote
That's a good point. It also complicates things a little bit, since VA needs to have some understanding of the #if statement, to know when it wants to suggest defined.

I have put in a feature request for this:

case=8490

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

tailsu
Senior Member

37 Posts

Posted - Sep 03 2007 :  07:25:56 AM  Show Profile  Reply with Quote
Btw, the same effect is observed when writing #pragma's (like #pragma comment(lib, "d3d9")) so the problem can be generalized at this point - when writing precompiler directives, VA's suggestions are bogus.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Sep 03 2007 :  2:20:51 PM  Show Profile  Reply with Quote
The wrong suggestions appearing on a line starting with # is a known problem that we are working on. Some improvements have been made internally:

case=2338

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