View Single Post
Old 01-10-2019, 05:57 AM   #1
StAN
Human being with feelings
 
Join Date: Oct 2014
Posts: 12
Default iPlug2 Issue: Hide control

Hello!

Please help. I need at a value of 0 show control, if not 0, hide control.
__________________________________________________ _______________________
YES:
void MyTest::OnParamChange(int paramIdx)
{
switch (paramIdx)
{
case kGain:
mGain = GetParam(paramIdx)->Value() / 100.;
if (mGain<=0) {
GetUI()->GetControl(hidehide)->Hide(false);
}
break;

default:
break;
}
}
__________________________________________________ _______________________
NO:
void MyTest::OnParamChange(int paramIdx)
{
switch (paramIdx)
{
case kGain:
mGain = GetParam(paramIdx)->Value() / 100.;
if (mGain<=0) {
GetUI()->GetControl(hidehide)->Hide(false);
} else{
GetUI()->GetControl(hidehide)->Hide(true);
}
break;

default:
break;
}
}
__________________________________________________ ____________________________
error:
void *Get() const { return m_size?m_buf:NULL; } // returns NULL if size is 0
Thread 1: EXC_BAD_ACCESS (code=1, address=0x34)
StAN is offline   Reply With Quote