Cannot place variable X in external scope Y

I don’t know why those component specific functions there but they break when I rename the component so I stopped using them. Therefore I would still like to know why I can’t get a reference to a component in a parent class.