Forum Discussion
7 Replies
- downinitChannel Surfer
I'm not long into dealing with (learning) Roku, so pardon any non-applicable points.
First glance:
1. Your initscreenstack() in manager.brs doesn't appear to be called, so m.scenegroup isn't instanced.
2. Is the abstraction of [manager.xml/brs] taking on a controlling duty, rather than the [mainscene.xml/brs], worth it?
If so:
2b. Don't include the extra <script> for manager.brs in your mainscene.xml. When you want .brs scripts included by multiple components, make them separate .brs files not tied to any components. For example: if component.brs is serving as the script init() backing to component.xml, then don't include that in differentcomponent.xml, otherwise it leads to confusion with unclear context; make a separate shared.brs file.
2c. Then in manager.brs you can change initscreentstack() to init() and it won't conflict.
2d. Then in mainscene.brs at handling the back button, call your interface function for closeScreen: m.manager.callFunc("closeScreen"), as you did with showScreen, instead of closeScreen().
3. The mainscene.brs OnKeyEvent doesn't return the result. Though it does in your commented-out version.Any luck?
- youssefsherifStreaming Star
yup thanks for that i got it and tried it and its not crashing but now the problem is that it is not displaying anything and when i tried to debug it returns an empty component
<Component: roSGNode:Manager> = { childRenderOrder: "last" clippingRect: <Component: roAssociativeArray> enableRenderTracking: false inheritParentOpacity: true inheritParentTransform: true muteAudioGuide: false opacity: 1 renderPass: 0 renderTracking: "disabled" rotation: 0 scale: <Component: roArray> scaleRotateCenter: <Component: roArray> translation: <Component: roArray> visible: true change: <Component: roAssociativeArray> focusable: false focusedChild: <Component: roInvalid> id: "" }
- surendra019Binge Watcher
Could someone please help me in switching screen from roScreen to roSGScreen and then come back to roScreen