Weird compiler error with Introjucer on tip code

Hi,

on the tip code, compiling the introjucer i get this error under Visual Studio 2005.

1>w:\sw\juce\extras\introjucer\source\project\jucer_treeviewtypes.cpp(105) : error C2259: 'ProjectInformationComponent' : cannot instantiate abstract class 1> due to following members: 1> 'void juce::Value::Listener::valueChanged(juce::Value &)' : is abstract 1> w:\sw\juce\modules\juce_data_structures\values\juce_value.h(144) : see declaration of 'juce::Value::Listener::valueChanged'

but looking at the code the juce value object mentioned doesnt seem relevant to the ProjectInformationComponent.

but weirder still, it builds fine under Visual Studio 2010 !!

i tried the obvious cleans and deleting any temp files, to no avail. could this be a compiler bug or something slipping through.

anyone else seen any differences like this?

Ah, this is an old MS bug where it sometimes gets muddled when there are inner classes with the same name.

So if I have a Button::Listener and a Value::Listener class, it sometimes (but not always…) gets them confused, even if you fully specify the type.

That’s why you’ll find a few typedefs in the code like this:

/** This typedef is just for compatibility with old code and VC6 - newer code should use Button::Listener instead. */ typedef Button::Listener ButtonListener;

I edited that class recently, and obviously forgot to use the “ButtonListener” instead of “Button::Listener” in its declaration.

aha! thanks for this explanation, i thought i was going mad, the error had nothing to do with the listener in question. indeed it’s getting mixed up with another one.

cool. it means i dont have some weird magic somewhere that’s throwing VC2005 over.