SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-11-2008, 07:03 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
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
Reply With Quote
  #2  
Old 02-11-2008, 07:32 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
  #3  
Old 02-11-2008, 09:39 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
Thanks alot for your help.... I used both for different sections, and they work like a charm...

Thanks,
Jeff
Reply With Quote
  #4  
Old 02-11-2008, 11:23 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
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
Reply With Quote
  #5  
Old 02-12-2008, 01:09 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
  #6  
Old 02-12-2008, 06:18 AM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
Thanks again... It is starting to make sense...

-Jeff
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.