Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
georgejecook
Streaming Star

Subclassing - return values and overriding

Hi, if I have component <MyWidget> which has a method
function GetName() as string
return "MyWidget"
end function

and I have MyChildWidget, which extends MyWidget, which in turn overrides GetName() then, how can MyChildWidget get the resilt of MyWidget. I currently see both code paths are executed (i.e. if I log in both, they both get called); but I don't see any means of getting the base.GetName() method value in the subclass.GetName() value.

Is there such a mechanism in SceneGraph/BS?
George Cook
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.