powerfinger
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2013
09:24 PM
Live Canvas not appearing when integrating with grid
Hello,
I have a grid application where I am making the first row of the grid a live feed. It is currently a search screen, with code in appmain like this:
' Display the search screen
Function displaySearchScreen()
...setup and display search window
end function
To test my implementation, I took the custom video player example and copied the code into appmain, right below the displaySearchScreen function above. Then, I changed the RunUserInterface sub in the example code (now pasted into appMain) take the place of the code in the displaySearchScreen function. My grid still shows Search as the option, but when I choose it, the audio from the live feed starts to play - the screen is blank. Pressing the down arrow, as suported in the custom video player example, produces the full screen video. Another down arrow scales the video to the window in the custom video player canvas, but my canvas does not display.
The code for the display of the canvas is, I believe:
Sub SetupFramedCanvas()
m.canvas.AllowUpdates(false)
m.canvas.Clear()
m.canvas.SetLayer(0, [
{ 'Background:
Url: m.background
CompositionMode: "Source"
},
{ 'The title:
Text: "Custom Video Player"
TargetRect: m.layout.top
TextAttrs: { valign: "bottom", font: m.headerfont, color: m.textcolor }
},
{ 'Help text:
Text: m.help
TargetRect: m.layout.right
TextAttrs: { halign: "left", valign: "top", color: m.textcolor }
}
])
m.paint()
m.canvas.AllowUpdates(true)
End Sub
I was expecting the m.paint() statement to produce the canvas, but it does not. The event loop does appear to be working however. What should I be looking for? Any assistance appreciated.
I have a grid application where I am making the first row of the grid a live feed. It is currently a search screen, with code in appmain like this:
' Display the search screen
Function displaySearchScreen()
...setup and display search window
end function
To test my implementation, I took the custom video player example and copied the code into appmain, right below the displaySearchScreen function above. Then, I changed the RunUserInterface sub in the example code (now pasted into appMain) take the place of the code in the displaySearchScreen function. My grid still shows Search as the option, but when I choose it, the audio from the live feed starts to play - the screen is blank. Pressing the down arrow, as suported in the custom video player example, produces the full screen video. Another down arrow scales the video to the window in the custom video player canvas, but my canvas does not display.
The code for the display of the canvas is, I believe:
Sub SetupFramedCanvas()
m.canvas.AllowUpdates(false)
m.canvas.Clear()
m.canvas.SetLayer(0, [
{ 'Background:
Url: m.background
CompositionMode: "Source"
},
{ 'The title:
Text: "Custom Video Player"
TargetRect: m.layout.top
TextAttrs: { valign: "bottom", font: m.headerfont, color: m.textcolor }
},
{ 'Help text:
Text: m.help
TargetRect: m.layout.right
TextAttrs: { halign: "left", valign: "top", color: m.textcolor }
}
])
m.paint()
m.canvas.AllowUpdates(true)
End Sub
I was expecting the m.paint() statement to produce the canvas, but it does not. The event loop does appear to be working however. What should I be looking for? Any assistance appreciated.
1 REPLY 1
powerfinger
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2013
01:16 PM
Re: Live Canvas not appearing when integrating with grid
ok - I guess I had to copy the backHD and backSD to the image folder so the command would have something to display. Good thing there is a no such thing as a stupid question, huh?
Thanks for reading...
Thanks for reading...