RobotStudio event

EventTableTriggerIO and EventTableActionIO do not work for Smart Component IO

Hi,

I tried to use EventTableTriggerIO and EventTableActionIO for IOs of a smart component in a code behind way. However,  they do not work if I set 'controller' property to the smart component. 


        public void AddEventTable(SmartComponent component)
        {
            Project.UndoContext.BeginUndoStep("EventTable");
            try
            {
                //define event table trigger IO
                EventTableTriggerIO etTriggerDi1 = new EventTableTriggerIO();
                etTriggerDi1.Controller = component;
                etTriggerDi1.Name = "di1";
                etTriggerDi1.Value = 1;

                //define event table action IO
                EventTableActionIO etActionDo1 = new EventTableActionIO();
                etActionDo1.Controller = component;
                etActionDo1.Name = "do1";
                etActionDo1.Value = 1;

                //define event table entry
                EventTableEntry etEntryDly = new EventTableEntry();
                etEntryDly.EventTableTrigger = etTriggerDi1;
                etEntryDly.EventTableActions.Add(etActionDo1);
                etEntryDly.EventActivationMode = EventActivationMode.Simulation;

                EventTableEntryCollection etec = Simulator.ActiveConfiguration.EventTable.EventTableEntries;
                etec.Add(etEntryDly);

            }
            catch
            {
                Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
                throw;
            }
            finally
            {
                Project.UndoContext.EndUndoStep();
            }
        }

It works if the trigger and action signals are set to be station signals, but not for smart component signals.

Is there anything wrong in my coding? Or is it a bug?