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 01-27-2006, 01:55 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Menu templates: an idea for organizing STV code

I've been experimenting lately with a sort of macro-expansion idea for STV menus, as a way of factoring out common menu structure to a greater degree than seems to be possible with themes. The idea is to define a skeleton or template menu containing all of the common structure and formatting elements, but with placeholders (formal parameters) where the specific content would be. You can then define other menus in terms of that template by providing widget chains (actual parameters) to fill in the placeholders at runtime. I've written some external Java code to do that widget-chain parameter substitution on the fly at runtime so the actual STV code remains fairly clean and readable.

For details, take a look at some preliminary documentation I've written up. You can also download a Zip file containing the Java code along with a sample STV that uses it. Please be aware that this is a work in progress, so some of the details may change as I continue to experiment. I should also probably mention that this is my first foray into "real" Java (as opposed to J#, JavaScript, and the like), so it's quite possible I've committed some newbie blunders simply from not knowing the "right" way to do things.

At this stage I'm not really announcing the release of anything so much as I'm looking for feedback on whether people think this is a reasonable approach to STV development. I'm especially interested in how the Sage devs feel about what could be construed as an abuse of the WidgetAPI, whether they foresee any issues arising from the continual rejiggering of widget references at runtime. Or, conversely, whether they'd consider adding features to the API to make it a bit friendlier to this transformational style of STV programming. (There are a couple of suggestions along these lines in the Problems section of the linked docs.)

I'm posting this here in the Studio forum instead of the Customizations forum because this isn't really an STV add-on or customization in the usual sense but rather a toolkit for Studio users. But if the mods would rather have it elsewhere, by all means move it.
__________________
-- Greg
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 12:37 PM.


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