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 11-09-2008, 11:19 AM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
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
Reply With Quote
  #2  
Old 11-09-2008, 07:57 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
  #3  
Old 11-09-2008, 08:43 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Sorry, I did mean Fork(). I will take a look at the theme. Thanks.
__________________
-Craig
Reply With Quote
  #4  
Old 11-15-2008, 07:39 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
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
Reply With Quote
  #5  
Old 11-16-2008, 01:22 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
  #6  
Old 11-16-2008, 07:50 AM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Ok - thanks for confirming this.
__________________
-Craig
Reply With Quote
  #7  
Old 11-17-2008, 01:17 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
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.
Reply With Quote
  #8  
Old 11-18-2008, 03:29 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
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
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
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


All times are GMT -6. The time now is 02:30 AM.


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