'Set the input learner for channel id.'

@Inputs.learner
def set_learner(self, learner, id):

    if (id in self.learners):
        if (learner is None):
            del self.learners[id]
            del self.results[id]
            del self.curves[id]
        else:
            self.learners[id] = learner
            self.results[id] = None
            self.curves[id] = None
    elif (learner is not None):
        self.learners[id] = learner
        self.results[id] = None
        self.curves[id] = None
    if len(self.learners):
        self.infob.setText(('%d    learners    on    input.' % len(self.learners)))
    else:
        self.infob.setText('No    learners.')
    self.commitBtn.setEnabled(len(self.learners))
