SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Studio (http://forums.sagetv.com/forums/forumdisplay.php?f=34)
-   -   Using the default STV in Custom STV Mode from custom STVs (v6.4 & later) (http://forums.sagetv.com/forums/showthread.php?t=32921)

Opus4 12-08-2010 10:46 AM

Showing my penchant for indecision... maybe I won't make any changes after all. How critical is this? I can't seem to resolve all requests for this issue because I've discovered that I've been going in circles.

I found old emails discussing the fact that Left was jumping to the Main Menu rather than returning to the custom STV. I changed it. Then, there were emails saying that Left was using Home to return to the Main Menu, but this caused problems where you couldn't use Left to jump to the Main Menu if it was a parent of the current menu because Home was issued & that returned the user to the custom STV. So, I changed it again such that Left started jumping directly to the Main Menu again instead of using Home. Now, the request is to have Left return to the custom STV instead of the Main Menu.

I suppose I could add yet another custom STV mode global variable so the calling STV could specify what it wants to do... but is it needed?

Currently, Home can be used to return to the custom STV. If you use Back and reach the end of the menu history, you'll return to the custom STV on the next usage of Back. If you manage to reach the Main Menu, then Exit's submenu has an option to return to the custom STV.

If I make the change again, this will break if you have it set to return to the custom STV when Home is used:
Quote:

Originally Posted by GKusnick (Post 468254)
My main concern, which I believe we resolved back in September, was that if I jump from a custom STV to the stock Main Menu, and then navigate into a menu from there, then Left should take me back out to the stock Main Menu where I came from rather than jumping all the way back to the custom STV. This does seem to be working now as I expect it to, so no change is needed there.


So.... do I leave it alone or is another variable needed to control how Left returns to the Main Menu on the menus where it does that? I just want to make sure that any changes for this don't get reversed again later. :)

- Andy

GKusnick 12-08-2010 03:32 PM

I guess my thinking is that you should do what makes sense and results in simple, clean code on your end, without worrying too much about trying to please everyone. Your first obligation should be to users of the stock STV and making sure their expectations are met with respect to Left, Back, and Home. Custom STV devs who need a slightly different behavior from the stock UI always have the option of creating an STVI to implement that behavior, and specifying that STVI as a dependency of their custom STV.

bialio 12-08-2010 03:33 PM

I agree.

bialio 12-08-2010 05:07 PM

IF you were to add another global variable, I'd say one that is a 'Left == BACK' mode - I think that is generally what SageMC and subsequently Phoenix are doing, but I'm totally fine having an STVi for the default UI that is packaged with Phoenix....

btl.

Opus4 12-09-2010 05:50 AM

Quote:

Originally Posted by GKusnick (Post 468482)
I guess my thinking is that you should do what makes sense and results in simple, clean code on your end, without worrying too much about trying to please everyone. Your first obligation should be to users of the stock STV and making sure their expectations are met with respect to Left, Back, and Home. Custom STV devs who need a slightly different behavior from the stock UI always have the option of creating an STVI to implement that behavior, and specifying that STVI as a dependency of their custom STV.

The change regarding how Left was handled only affected how it jumped to the Main Menu & was only modified for this custom STV feature. Its functionality when not using custom STV mode wasn't affected. And, originally, it was needed for custom STVs so they didn't have to modify the default STV - which is now easier via plugins.

Quote:

Originally Posted by bialio (Post 468516)
IF you were to add another global variable, I'd say one that is a 'Left == BACK' mode - I think that is generally what SageMC and subsequently Phoenix are doing, but I'm totally fine having an STVi for the default UI that is packaged with Phoenix....

The functionality of Left wasn't in question -- it goes to the parent menu & is not always the same as Back. I currently have no plans to change that. The only difference I was concerned with relates to how it jumps to the Main Menu on the menus where that is what issuing Left accomplishes -- some people using custom STV mode want it to jump directly to the Main Menu, while others want it to use the Home command so it would return to the custom STV & they would thus never see the Main Menu.

Since you are OK with creating a plugin to change it the way you want it, I'll leave it the way it is for now. Let me know if that becomes an issue. It should be a fairly quick change for me to add if you find you really need it -- using a menu jump vs. Home, I mean; not Left == Back. :)

- Andy

bialio 12-09-2010 12:15 PM

So you are saying that Left triggers a couple of different responses in the default STV:

1) SageCommand("Back")
2) SageCommand("Home")
3) LaunchMenuWidget("Main Menu")

Or is it always 2 or 3, and it just resembles what 'Back' would do occasionally?

And in order to bypass the default Main Menu I'd want to make them all #2?

Opus4 12-10-2010 05:36 AM

"Left" means: go to the current menu's parent menu. This is often a hard link to some menu, but is sometimes simply the Back command if there are many menus that could be the parent.

When the parent menu is the Main Menu, it is directly jumping to the Main Menu, but you want it to use the Home command. Search for this line & modify what its children do:
"REM go to Main Menu via Home command, or Direct jump to Main Menu if 'ReverseOutAnim' is true."

- Andy

Gustovier 09-23-2011 04:25 PM

If i'm using this technique to jump back to a specific meny in the default STV, how can I also pass in variables that the menu might make use of as well? I thought by simply setting them with the staticContext() would work, but it doesn't seem to be sticking...

tmiranda 09-23-2011 04:57 PM

You probably need to use global contexts.

Gustovier 09-23-2011 05:50 PM

Quote:

Originally Posted by tmiranda (Post 516424)
You probably need to use global contexts.

Thanks tmiranda, u know I figured it out just like a few mins before you replied. Can't believe i made that mistake..lol! (Dont drink and code)


All times are GMT -6. The time now is 09:43 AM.

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