Search code examples
c++vstjuce

Parse Issue - expected unqualified id


Hey guys this is my code and i am relatively new to C++ and even coding really dont know why i am getting a parse error though i as per my understanding i have placed the parenthesis properly anyone please suggest if i am missing anything here.

i am getting error at this line

class getProcessor()->RequestUIUpdate()// UI update must be done each time a new editor is constructed

Full Code:

StereoWidthCtrlAudioProcessorEditor::StereoWidthCtrlAudioProcessorEditor (StereoWidthCtrlAudioProcessor* ownerFilter)
    : AudioProcessorEditor(ownerFilter)
{
    addAndMakeVisible (WidthCtrlSld = new Slider ("Width Factor Slider"));
    WidthCtrlSld->setRange (0, 5, 0.1);
    WidthCtrlSld->setSliderStyle (Slider::LinearHorizontal);
    WidthCtrlSld->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
    WidthCtrlSld->addListener (this);

    addAndMakeVisible (BypassBtn = new TextButton ("Bypass Button"));
    BypassBtn->setButtonText (TRANS("Bypass"));
    BypassBtn->addListener (this);

    addAndMakeVisible (label = new Label ("new label",
                                          TRANS("Stereo Width Factor:")));
    label->setFont (Font (15.00f, Font::plain));
    label->setJustificationType (Justification::centredLeft);
    label->setEditable (false, false, false);
    label->setColour (Label::textColourId, Colour (0xffa34747));
    label->setColour (TextEditor::textColourId, Colours::black);
    label->setColour (TextEditor::backgroundColourId, Colour (0x00000000));


    //[UserPreSize]
    //[/UserPreSize]

    setSize (600, 400);


    //[Constructor] You can add your own custom stuff here..

    class getProcessor()->RequestUIUpdate()// UI update must be done each time a new editor is constructed

    startTimer(200)//starts timer with interval of 200mS
    BypassBtn->setClickingTogglesState(true);
    //[/Constructor]
}

StereoWidthCtrlAudioProcessorEditor::~StereoWidthCtrlAudioProcessorEditor()
{
    //[Destructor_pre]. You can add your own custom destruction code here..
    //[/Destructor_pre]

    WidthCtrlSld = nullptr;
    BypassBtn = nullptr;
    label = nullptr;


    //[Destructor]. You can add your own custom destruction code here..
    //[/Destructor]enter code here
}

Solution

  • class is a keyword mainly used in declarations. You probably meant:

    getProcessor()->RequestUIUpdate();