|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Getting the next entry in a table
Hello,
I am attempting to write a new mini guide, and have the basic functionality completed, but I have one issue that I am getting stuck on. I have a table built on an airing listing and upon the listener widget for up/down, I want to set a variable to the next airing object that will be active upon completion of the up/down action and call a refresharea() to have it update the Description. Currently when the listener widget for up/down is called, the tablecomponent is set to the current object before the up/down is executed. Is there a way to increment/decriment the tablecomponent object to access a different object??? Thanks, Jeff |
#2
|
||||
|
||||
Why not use a FocusGained hook instead? That will fire on the table element you want, namely the one receiving focus.
Better yet, use GetFocusContext in your Description code to access the variable context for the focused element. Then you don't need to do any explicit refreshing, since GetFocusContext handles that automatically when the focus changes.
__________________
-- Greg |
#3
|
|||
|
|||
Thanks alot for your help.... I used both for different sections, and they work like a charm...
Thanks, Jeff |
#4
|
|||
|
|||
One more question, my layout has 2 tables on the screen, 1 with a channel listing, and another with the selected channels airing list from the current time. When I change focus on the left table, I refresh the left table with the airings for that channel. When I "right" over to the airings table, I always want it to have focus on the first entry, but it moves over to the same row as the left table was selected. I have tried the SetFocusForVariable, but I must not be getting something right with it, because it starts acting crazy and moves my focus back to the left table if I hit the "right" button.
Can you call a GetElement on a table to get the first entry to pass to the SetFocusForVariable call or is there another way to set the focus back to the top of the table? Thanks, Jeff |
#5
|
||||
|
||||
Presumably you have an array or list or something feeding into the table. That list or whatever is what you want to call GetElement on, not the table itself. Just make sure to assign the list to a variable (if you're not already doing that) so you can refer to it more than once.
In other words, don't think of the table as a data structure that you need to index into. The table is just a way of displaying an already existing data structure on screen. You're free to index or iterate over that existing data structure just as you would any other list or array, independently of the fact that it happens to feed into a table widget.
__________________
-- Greg |
#6
|
|||
|
|||
Thanks again... It is starting to make sense...
-Jeff |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table with variable size cells | bialio | SageTV Studio | 13 | 01-21-2008 03:05 PM |
SageTV service takes 10-20 minutes to start | White94Cobra | SageTV Software | 0 | 11-06-2007 09:00 PM |
How to set ivtv frequency table to us-cable-hrc? | jpwegas | SageTV Linux | 9 | 08-30-2007 09:05 PM |
Recorded shows automatically deleted? | cfcrafting | SageTV Software | 16 | 02-02-2006 01:12 PM |