|
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
|
|||
|
|||
Show OptionsMenu When Leaving Menu/Screen
I am trying to show an OptionsMenu when leaving my SageMC menu/screen. I have put the UI code in the BeforeMenuUnload hook. This causes Sage to lock up when it attempts to show the OptionsMenu (I get the wait circle until I shut down Sage). If I put the UI code under a "Hook()" line then it only works some of the time. That is, if I go "Back" from my menu it shows the OptionsMenu as expected. However, if I issue the "Home" command it only shows the OptionsMenu sometimes and when I close the OptionsMenu it shows an empty main menu - I have to issue the Home command again to see the main menu items. Is there a consistent way to do this?
__________________
-Craig |
#2
|
||||
|
||||
I'm not sure what you mean by a "Hook()" line. There's no such API call that I'm aware of. Maybe you mean "Fork()"? That shouldn't be necessary in BeforeMenuUnload, and would probably be counterproductive since it would allow the rest of the Unload code to continue executing while the OptionsMenu is up.
I've used BeforeMenuUnload to display an OptionsMenu and it works fine for me. But I don't write mods for SageMC so maybe there's some extra dependency I don't know about. One thing you may want to check is whether the menu you're exiting from inherits a BeforeMenuUnload hook from its theme. If so, your explicit hook will override that inherited hook and possibly break something in the process. If that's the case, you'll need to link to the code under the theme hook to make sure it gets executed in your hook as well.
__________________
-- Greg |
#3
|
|||
|
|||
Sorry, I did mean Fork(). I will take a look at the theme. Thanks.
__________________
-Craig |
#4
|
|||
|
|||
This doesn't seem to depend on STV so it might be a bug? I tried adding a new simple test menu/screen to the standard STV. It just has one line of text with no theme and tries to show an Options menu in the BeforeMenuUnload hook. I get the never ending wait circle with this simple test as well.
__________________
-Craig |
#5
|
||||
|
||||
I double-checked my code and it looks like I was mistaken. I didn't do it from BeforeMenuUnload; I did it from a Home listener. My bad.
When I tried it just now from BeforeMenuUnload, it hung for me too. So I don't know what's up with that. Sorry.
__________________
-- Greg |
#6
|
|||
|
|||
Ok - thanks for confirming this.
__________________
-Craig |
#7
|
||||
|
||||
I had originally planned to make a comment not to do that until Greg said he was doing things this way... but then he revised that statement, so I'll go back to my original "don't do that".
By trying to open an OptionsMenu in the BeforeMenuUnload hook, you are trying to open a dialog during a menu transition & dialogs are automatically closed during that time. There are probably other locks going on in the core that interfere with trying to use an OptionsMenu at that point. Opening the dialog after Fork() and Wait(SomeTime) might work, but only because you would be waiting until the next menu is loaded.... in which case, perhaps consider doing it in the next menu's AfterMenuLoad hook, if possible. If the dialog should open before leaving the menu, it would be better to show the dialog before calling the next menu, and therefore before the BeforeMenuUnload hook is called. - 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. |
#8
|
|||
|
|||
Ok, thanks. I will try the Fork + Wait approach since it seems better than trying to listen for all possible commands that will cause the menu to be unloaded.
__________________
-Craig |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Live TV skips when a new show "starts" | djseto | SageTV Software | 6 | 01-24-2008 08:21 PM |
Crazy Idea: double check the show being recroded is correct | Berg | SageTV Software | 1 | 10-12-2006 10:15 AM |
record first show on channel with padding | pschweig | SageTV Beta Test Software | 1 | 04-18-2006 04:28 PM |
Dual-Tuner and IR Records same show on two channels | tfurlong | SageTV Software | 5 | 01-26-2006 08:22 PM |
Record current show? | domc | SageTV Software | 7 | 01-23-2006 09:42 PM |