This is weird… either I’m blind or stupid…
XCode 4.3.2 - Juce v2.0.21
I have a Juce generated component where I subclass Component:
[code]class CTrackComponent : public Component
{
public:
//==============================================================================
CTrackComponent ();
~CTrackComponent();
//==============================================================================
//[UserMethods] -- You can add your own custom methods in this section.
void setIndexValue (int iIndex);
void setPosition (int iPosition);
//[/UserMethods]
void paint (Graphics& g);
void resized();
void moved();
void parentSizeChanged();
void lookAndFeelChanged();
bool hitTest (int x, int y);
void mouseDown (const MouseEvent& e);
void mouseDrag (const MouseEvent& e);
void mouseUp (const MouseEvent& e);
//==============================================================================
juce_UseDebuggingNewOperator
private:
//[UserVariables] – You can add your own custom variables in this section.
Image *channelStripImage;
Image *channelBlockImage;
bool m_bDragging;
int m_iTrackIndex;
int m_iTrackPosition;
//[/UserVariables]
//==============================================================================
// (prevent copy constructor and operator= being generated..)
CTrackComponent (const CTrackComponent&);
const CTrackComponent& operator= (const CTrackComponent&);
};[/code]
I’ve define the methods in the cpp file:
[code]//[MiscUserCode] You can add your own definitions of your custom methods or any other code here…
void CTrackComponent::setIndexValue(int iIndex)
{
m_iTrackIndex = iIndex;
}
void CTrackComponent::setPosition(int iPosition)
{
m_iTrackPosition = iPosition;
}
//[/MiscUserCode][/code]
in PluginEditor.cpp I use:
[code] int k=0;
CTrackComponent temp2;
temp2.setIndexValue(k);[/code]
If I highlight setIndexValue and Jump to definition it takes me to the correct location in my code, but if I compile or try and autocomplete setIndexValue doesn’t show up and I get a compile error: No member named setIndexValue in CTrackComponent
If I create a test class from scratch all member functions are found and everything works as expected… All files are in the project…
What am I missing
Thanks,
Rail
