|
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
|
||||
|
||||
STV Initializations vs. ApplicationStarted hook
Are any of the STV customizations adding code under the ApplicationStarted hook to initialize settings? If so, you should note that this hook is only called when SageTV is starting, not when an STV is loaded or imported.
For the default STV, I changed things so that while the global init code is located in the ApplicationStarted hook, I also check to see if it needs to be reloaded in the Main Menu's BeforeMenuLoad hook -- if the global variable gGlobalVarsAreSet is not true, then the init code is called again. When an STV is loaded or imported, that global variable is cleared so the global init gets called again when the Main Menu is entered, which automatically happens after an STV load/import. So, if your STV import is meant to work with the default STV, you can add init code under the "REM Set the global variables for this STV" action widget & it will get called when your customization is imported. This helps prevent the need to restart SageTV when a customization is loaded, unless external plugins need to be loaded at startup. - 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. |
#2
|
||||
|
||||
But the Main Menu BeforeMenuLoad is not going to get called if you're using nielm's Dynamic Menus right?
John |
#3
|
||||
|
||||
The BeforeMenuLoad hook of the menu whose widget name is "Main Menu" will always be called when the STV is loaded. If that hook then wants to load a different menu, that's fine, so long as the global initialization happens first.
I haven't looked at how the Dynamic Menu STVI is implemented, but if it works by renaming the default Main Menu to something else and creating a new menu called "Main Menu" (instead of chaining to the new menu from the default menu's BeforeMenuLoad hook), then I guess that STVI will need to be updated to accommodate the global init code.
__________________
-- Greg |
#4
|
||||
|
||||
Quote:
However, I think that you need to import the dynamic menus last for this to work correctly. (Greg, yes, it renames the Original Main Menu to something else, and imports a new Main Menu... there were various reasons for this, mainly relating to getting the Home key to work correctly....)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#5
|
||||
|
||||
If it would help to have the Main Menu's BeforeMenuLoad hook contents all under a single comment widget for easier linking, let me know.
- 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. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple (but effective) security for any STV | Lester Jacobs | SageTV Customizations | 5 | 12-17-2010 03:21 PM |
STV: SageMC 16x9 Version 6.x (latest dev build) | dflachbart | SageMC Custom Interface | 6112 | 04-04-2008 11:16 PM |
Recovering Default STV | aukauk | SageTV Customizations | 2 | 03-20-2007 01:18 PM |