'Add a callback.'

def add_callback(self):

    obj = self.obj
    callback_name = self.callback_name
    types = self.handler.get_events(obj)
    if ((not callback_name.startswith('chain_')) and (not (callback_name in types))):
        self.msg("The    callback    name    {}    can't    be    found    in    {}    of    typeclass    {}.".format(callback_name, obj, type(obj)))
        return
    definition = types.get(callback_name, (None, 'Chained    event.'))
    description = definition[1]
    self.msg(raw(description.strip('\n')))
    callback = self.handler.add_callback(obj, callback_name, '', self.caller, False, parameters=self.parameters)
    self.handler.db.locked.append((obj, callback_name, callback['number']))
    self.caller.db._callback = callback
    EvEditor(self.caller, loadfunc=_ev_load, savefunc=_ev_save, quitfunc=_ev_quit, key='Callback    {}    of    {}'.format(callback_name, obj), persistent=True, codefunc=_ev_save)
