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 07-12-2006, 01:22 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Obtaining correct UI context

I noticed that one of my plugins does not work correctly when I import it on my MVP, but the same plugin works fine on my server / clients.

I see the following exception during the import :

Code:
Wed 7/12 15:02:02.280 EXCEPTION in getValueAsObject:java.lang.Exception: EvaluatorVisitor.getValue(): Error during evaluation
My guess is that this is caused by passing the wrong UI context to the SageTV.apiUI() method... My import utility library always calls this API with the "SAGETV_PROCESS_LOCAL_UI" context, which is obviously wrong in case of the MVP.

Now, how do I obtain the correct context of the caller ? The java doc lists GetUIContextName(), which will only be available in 5.1, and GetUIContextNames(), which might return more than one context.

I just tried this out and printed the results of this API on my Server machine (running as a service), and on my MVP, and on both it only returned one context name ("SAGETV_PROCESS_LOCAL_UI" on the server, and the MAC address on the MVP). My question is: under which circumstances does the GetUIContextNames() API return multiple contexts, and how can I obtain the caller context in this case (before 5.1 comes out) ?

Thanks,
Dirk
Reply With Quote
  #2  
Old 07-13-2006, 02:05 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
In the SageTV service, it should only return extender's context names (MVP's and placeshifter) if any are connected.

In the SageTV client (or in the SageTV UI on the server when running with the service enabled), it will only return an array containing "SAGETV_PROCESS_LOCAL_UI"

If you dont use the service, then on the server, it will return an array containing "SAGETV_PROCESS_LOCAL_UI" and string for each extender (MVP/Placeshifter)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #3  
Old 07-13-2006, 07:44 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by nielm
In the SageTV service, it should only return extender's context names (MVP's and placeshifter) if any are connected.

In the SageTV client (or in the SageTV UI on the server when running with the service enabled), it will only return an array containing "SAGETV_PROCESS_LOCAL_UI"

If you dont use the service, then on the server, it will return an array containing "SAGETV_PROCESS_LOCAL_UI" and string for each extender (MVP/Placeshifter)
Thanks for the info.
If I understand this correctly - if you have multiple MVP/Placeshifter connections running, it is currently impossible to retrieve the correct UI context ?

So best practice right now (before 5.1 comes out) would be to always use the first context returned by GetUIContextNames()for all SageTV.apiUI() calls, which would always work for client and SageTV UI in service/non-service mode, but for Placeshifter/MVP only if at the time of the import only one of those clients is connected ?

Thanks,
Dirk
Reply With Quote
  #4  
Old 07-17-2006, 07:10 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by flachbar
So best practice right now (before 5.1 comes out) would be to always use the first context returned by GetUIContextNames()for all SageTV.apiUI() calls, which would always work for client and SageTV UI in service/non-service mode, but for Placeshifter/MVP only if at the time of the import only one of those clients is connected ?
Any comments on this from the official side ?


Thanks,
Dirk
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


All times are GMT -6. The time now is 08:52 PM.


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