The channel object is responsible for channel-wide globals. It has nothing to do with the grid. The grid and other objects use the channel object for various things but not for their own internal state. See the SimpleGrid example in the continuous button-down thread for a more simpler way to understand how objects work. You can see what variables are invalid in your own code simply by print variable, eg print, i, CellWidth, CellHeight before calling the function. If anyone prints invalid then you have your culprit
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )