I have a TableListBox which displays custom cells. My refreshComponentForCell function is implemented as such:
Component* ATLoopsTableView::refreshComponentForCell (int rowNumber, int columnId, bool /*isRowSelected*/,
Component* existingComponentToUpdate)
{
ATLoopCell* loopCell = nullptr;
if (existingComponentToUpdate != nullptr) {
loopCell = static_cast<ATLoopCell*>(existingComponentToUpdate);
} else {
loopCell = new ATLoopCell(mLoops[rowNumber], mRemoteDataMgr, mSampleManager, mLoopPreviewView, mLevelInterface);
}
loopCell->setLoop(mRemoteDataMgr->getLoop(mLoops[rowNumber]));
return loopCell;
}
With this in place, the cellClicked function does not get triggered when I click the cell. However, if I simply return the existingComponentToUpdate in the refreshComponentForCell function, it gets triggered correctly. How can I implement my custom components correctly as to be able to trigger the cellClicked function?