Skip to main content

XletLogger and GRIN

1 reply [Last post]
dekz
Offline
Joined: 2010-07-04
Points: 0

I'm having some inconsistencies using both the XletLogger and the GRIN framework. I have the XletLogger still logging in the background and I set the visbility to false on the Xlet start up. I then display menus to receive some user input using GRIN. This works fine in TMT3, the XletLogger is visible for only a fraction of a second then it is hidden and the menu appears. The problem though is when running on an actual Blu-Ray device. When I run it on the PS3, the Logger will appear for a fraction of a second but then the menu will not load. If I set the XletLogger to be visible all the time then the menu is able to load (but there are some drawing problems and the menu isn't properly drawn but is still useable when navigating across the grid).

The GRIN menu can be found here: http://d.pr/BKkx
The process is, I have a menucontroller which allows me to reference and bring up menus in the GRIN file. This menu controller is created on the initXlet call, and it uses the TVContainer.getRootContainer(context). So all the animationEngine initialisation happens in the initXlet call. It performs all the activation of the Initialize segment as well as add the key events and get references to other segments. The animation engine only starts in the Xlet start() method.

I think it might be from the XletLogger calling Screen.setVIsible which sets the rootContainer to size (1,1) which if my GRIN menu is using the same container could be the cause of the problem. But this doesn't happen in the Emulator.
The XletLogger uses:
HScene scene = HSceneFactory.getInstance().getDefaultHScene();
scene.setBackgroundMode(HScene.BACKGROUND_FILL); // initiate LogDialog component to display log on the screen
Screen.setRootContainer(scene);

Any my menus use this.gui = TVContainer.getRootContainer(context);
Has anyone else experienced this problem and can offer a solution as to why this is happening?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chihiro_saito
Offline
Joined: 2006-11-08
Points: 0

Hi,
I recall that there had to be some coordination required from the xlet in order to let XletLogger show it's logging screen on the screen without having any conflict with the app painting. I believe the key method was XletLogger.setXletContainer(Container). The xlet that wants to use XletLogger's screen display should be using a sub-container as it's root to paint app stuff, and let the XletLogger deal with the root HScene, so that XletLogger can switch between the app screen and logging screen via user key press.
By the way, I've only used XletLogger for non-GRIN xlets. For grin-based projects, Bill came up with this neat GrinXlet logging feature (under xlets/GrinXlet) where there's a separate Show to display the trace output to the screen as well as sending it over http. That's what I use for doing debug outputs for grin.
Chihiro