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
 No Autocomplete For #defined pointers/references.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gunvulture
Junior Member

11 Posts

Posted - Jun 01 2006 :  1:57:26 PM  Show Profile  Reply with Quote
I use #defines to provide easy access to systems in my engine. However, autocomplete flat out doesn't work on them. Here is an example:

template <typename T>
class Singleton
{
<snip>
static T& GetSingletonRef(Context* i_pForFutureUse) { return *s_pSingleton; }
};

class EngineManager : public Singleton<EngineManager>
{ <snip> };

#define g_EngineManager EngineManager::GetSingletonRef(0)

Doing "g_EngineManager." shows no members at all.

Doing "g_EngineManager.SomeFunction(" shows a tooltip saying "#define g_EngineManager EngineManager::GetSingletonRef(0)"

Using VAX build 1445.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jun 01 2006 :  5:47:56 PM  Show Profile  Reply with Quote
unfortunately VA does not try to support this sort of thing. it is possible to do some very strange things with macro's, so it is easy to imagine just how complicated this would quickly become.

see supports answer here:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4253

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

swinefeaster
Tomato Guru

310 Posts

Posted - Jun 02 2006 :  5:23:01 PM  Show Profile  Reply with Quote
This is also considered bad programming practice by most developers... you should use polymorphism for this.

Regards,

swine
Go to Top of Page

gunvulture
Junior Member

11 Posts

Posted - Jun 04 2006 :  5:35:53 PM  Show Profile  Reply with Quote
Ah that appears to be me last time as well. I forgot I already mentioned it, heh.
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