SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

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 01-22-2008, 10:29 AM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Resizing Tables

In my AMG project that I'm working on (Advanced Mini Guide) I've got a table that gets the number of rows from a property. This works pretty well, however I'm seeing something weird when I try to change that property at runtime.

It seems like the table is limited on the upper end in size to the initial size it was when it is first created. For instance, if the property is 5 when Sage starts, I can change the property and see the table update from 5 to 4 or 3 or 2 or 1. But if I move it up to 6 rows, it still displays as 5.

If I leave the property at 6, and restart Sage, then it shows up as 6 the next time it is drawn.

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #2  
Old 01-22-2008, 11:33 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,595
Table size can't be changed dynamically, like you've been trying. I do this in several places in the default STV, but I take other steps to make sure the table uses the new values for the number of rows or columns. I essentially set the new size, then reload the menu where those new values are used.

To pick one menu w/a resizeable table, see the "LiveTVGuide w/ Optional Preview" menu in the default STV. The BeforeMenuLoad hook checks to see if the menu needs to be reloaded with the correct grid size, sets the appropriate static contexts, & then reloads the menu. During the following menu load, it will see that nothing needs to change & just continue. Note that if you follow the reference widget to see where this is checked, you will see a "Back" command used if the grid resizing is done while the menu is already loaded. This prevents the user from seeing the old grid size if they try to use Back later.

Calling the API function to clear the menu cache might accomplish the same thing (haven't tried it), but that will clear the cache for all menus instead of just the one being changed.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 01-22-2008, 12:56 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Quote:
Table size can't be changed dynamically, like you've been trying.
I'll take a look at what you mention below - however it does seem to allow smaller table - ie dynamically changing from 4 rows to 3 works. So maybe dynamically increasing the table size is what you can't do?
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #4  
Old 01-22-2008, 01:01 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
I don't know if this helps, but I had to set up resizable tables for the icon based main menu in SageMC. I wanted the size to change on the fly without having to exit the pop-up options menu. The way I did it was to pre-define a number of table widgets, each with it's own number of rows and columns. The contents of each table is just a linked reference to the same code, so that each table contains the same data. Then I essentially use a case statement to choose the table with the desired dimensions. This actually seems to work quite well. It isn't quite as compact as Andy's method, but I suspect you will only have a few variants so it shouldn't be too bad.

Your other option would be to use panels for all of the items in the AMG instead of tables. You can then change the size by just enabling/disabling individual panels. The advantage of this approach is that you can use AnimateTransition to animate the movement of the contents between all cells, including the large focused cell. You will be able to see an example of all of this in the fixed focus icon menus in the next release of SageMC.

Feel free to PM me if you want any help on this and I'll give you my e-mail address. I will definitely be using this mini guide when it is done, so I have more than just a passing interest in it.

Aloha,
Mike

Last edited by MeInMaui; 01-22-2008 at 01:04 PM.
Reply With Quote
  #5  
Old 01-22-2008, 01:11 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,595
Quote:
Originally Posted by MeInMaui View Post
The way I did it was to pre-define a number of table widgets, each with it's own number of rows and columns. The contents of each table is just a linked reference to the same code, so that each table contains the same data. Then I essentially use a case statement to choose the table with the desired dimensions.
Just so you know: this can work OK if the code leading up to the tables doesn't take long to execute, but it can really slow things down if that code is time consuming. What happens is that the UI widget chain leading up to the conditionals all has to be executed in order to determine which table will actually be shown, because some of that code could conceivably affect the conditional. I ran into this when I tried to add conditional tables to the malore menus & had to take them all back out because the execution time quadrupled due to 4 table possibilities at the end of the long widget chains.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #6  
Old 01-22-2008, 01:17 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
Thanks for the tip Andy.

Luckily I didn't run into that problem. (and I ended up with 60 table variants to choose from! )

Guess I got really lucky, as my widget chain leading up to the table is very short.

Aloha,
Mike
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
Navigation wrapping and scrolling tables MeInMaui SageTV Studio 9 12-21-2007 02:53 PM
Video resizing problem Chroner SageTV Software 0 08-24-2007 11:46 AM
Troubling Tables kuch68 SageTV Studio 5 09-13-2006 01:06 PM
2.1.10 - TV not resizing or slow resizing when go between menu PIP to fullscreen TV ruel SageTV Software 0 11-04-2004 01:17 AM
Overlay Resizing CanadianEh SageTV Beta Test Software 12 04-21-2004 06:08 AM


All times are GMT -6. The time now is 11:42 AM.


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