"TheEndless" wrote:
While I agree that a roImageCanvas tutorial would be worthwhile, I don't think I agree that it makes sense as a base tutorial. 95% of the channels out there don't use the image canvas at all, and I think most of the components in the SDK are designed to make it easy for a developer to write a channel quickly without having to worry about complex UI elements. Using the image canvas as a basic tutorial would probably be more misleading than helpful, IMHO.
I just meant that quite a few posts are made with questions about how to get started, and many seem to have a hard time applying general programming knowledge to BrightScript. While I agree that the ImageCanvas is probably less useful than a number of other components for the average beginning Roku developer, I also think it's well suited for a tutorial for the following reasons:
- It's very easy to get a simple page displaying in 10 lines of code or less with a colored background.
- It's easy to use simple language control structures to change the display.
- It doesn't require external media or servers to show content (colored boxes are easy)
The goal wouldn't be to get someone a base to use for their channel, but to illustrate how the SDK, Roku and BrightScript work together at a very simple level. After that, reading the BrightScript reference manual or Component guide would hopefully result in better understanding for those having a hard time linking whatever programming experience they have (if they have any) to what's offered by the SDK.
E.g.
part 1: Create a simple channel that displays an orange screen (covers channel upload, Main() function, CreateObject())
part 2: Add a colored box to the display (covers associative arrays)
part 3: Use a loop to draw multiple colored boxes on the screen
part 4: Add a message event handler to add boxes based on remote button presses
part 5: Add another component on top of the ImageCanvas to show the stacking nature of screens
etc.
After a tutorial such as that, it still may be confusing to look at the examples in some cases, but I would expect anyone to understand them with persistence.
-- GandK Labs
Check out Reversi! in the channel store!