eockh
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2012
07:10 AM
roImageCanvas not closing
I have the following navigation stack in my channel: (roGridScreen -> roScreen -> roImageCanvas)
When I exit the roImageCanvas screen I call (close()) and set the reference to invalid. However when I exit the roScreen, the channel displays the roImageCanvas for a moment before displaying the roGridScreen. I have also tried the following code in an effort to at least clear the screen to black and I still get the artifacting:
canvas.allowupdates(true)
canvas.purgecachedimages()
canvas.SetLayer(0, {Color:"#FF000000", CompositionMode:"Source"})
canvas.SetLayer(1, {Color:"#FF000000", CompositionMode:"Source"})
canvas.show()
canvas.close()
canvas = invalid
Any ideas why the image canvas is not destroyed?
When I exit the roImageCanvas screen I call (close()) and set the reference to invalid. However when I exit the roScreen, the channel displays the roImageCanvas for a moment before displaying the roGridScreen. I have also tried the following code in an effort to at least clear the screen to black and I still get the artifacting:
canvas.allowupdates(true)
canvas.purgecachedimages()
canvas.SetLayer(0, {Color:"#FF000000", CompositionMode:"Source"})
canvas.SetLayer(1, {Color:"#FF000000", CompositionMode:"Source"})
canvas.show()
canvas.close()
canvas = invalid
Any ideas why the image canvas is not destroyed?
2 REPLIES 2

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2012
09:09 AM
Re: roImageCanvas not closing
Try adding a short Sleep() immediately after closing the canvas. Show and Close aren't synchronous, so it may be that the canvas doesn't have sufficient time to close before you open the roScreen. It could also be an anomaly with roScreen that's related to this statement in the SDK documentation:
"http wrote:
Once an roScreen is created, the display stack enters "Game Mode", and other screen components cannot be used. Other screen components cannot be intermixed with roScreens as the roScreen display stack is maintained independently from the main screen component display stack.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
eockh
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2012
11:44 AM
Re: roImageCanvas not closing
The sleep was it..... Sleep(50) seemed to be sufficient. Thanks!