The else block code always fires.
virtual override int linkEvent(int eType, Link link)
{
Component cLinked = Sys.app.lookup(link.fromComp)
if (Sys.type(Sys.findKit("myKit").id, link.fromComp) != null)
{
if (eType == ADDED)
{
// when a link is added ... code here never gets run even though the comp is in the kit.
return 0
}
else // REMOVED
{
// also when a link is deleted ... code here never gets run even though the comp is in the kit.
return 0
}
}
else
// code here always runs which prints a debug message to stdout.
return 0
}