|
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
|
||||
|
||||
Studio Programming Conventions and Editing Tips
Looking through the code from the default STV I see that the convention seems to be to always put widgets that are executed sequentially as children rather than as "siblings". For example, if there are three action widgets that are to be executed sequentially they are coded in studio as:
Code:
Widget 1 Widget 2 Widget 3 Code:
Widget 1 Widget 2 Widget 3 Example 1: Code:
If Expression true Widget 1 Widget 2 Widget 3 else Widget 4 Code:
If Expression true Widget 1 Widget 2 Widget 3 else Widget 4 Next, how do you most effectively add or delete widgets that are somewhere in the middle of one of these long chains of children widgets? For example, what is the easiest way to delete Widget 1 in example 1? The manual says not to delete a widget if it has children but rather delete from the "bottom" and work your way up. What I've been doing is "collapsing" the chain at Widget 2, selecting Widget 2, cutting and pasting it just after the "true" and then deleting Widget 1. Is this the best way to do things? Likewise, what is the easist way to add a Widget that needs to be placed before Widget 1? If I add a Widget after the "true" it becomes a "sibling" of Widget 1. What I have been doing is collapsing the chain at Widget 1 and then cutting and pasting it as a child of the newly inserted Widget. Is this the best way? Thanks, Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
||||
|
||||
It is just the way they implemented the system. It is unconventional, but works well for handling parallel tasks, as instead of a single execution point in the entire STV, it can fork to different processes, and those can run down their individual 'family tree' if you will.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#3
|
||||
|
||||
I'm not sure what you mean. Are you saying that it's done this way so at another point in the STV I can put a reference to a widget and effectively use that widget chain as a "subroutine"? How does this help when using parallel tasks via fork()?
The developers at Sage have obviously coded the STV this way on purpose and I want to know what that purpose is so I can get a better grasp of Studio programming. They certainly know a lot more about Studio than I do and I want to learn from their experience. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#4
|
|||
|
|||
You can code either way. I only use the tree effect if I am calling some menu or if statments after evaluation.
|
#5
|
||||
|
||||
Quote:
BTW: your example 2 can get quite large & harder to collapse portions of it if you have many more widgets all placed as siblings. Quote:
Quote:
Moving can be done easier with the mouse, in my opinion -- see "Moving and Copying Widgets" around p. 75. But... for more widget manipulation tools, I suggest you check out GKusnick's Studio plugin: New tools for Studio users - 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. |
#6
|
||||
|
||||
Thanks Plucky and Andy.
I am talking about a process chain, not a UI chain. I have installed GKusnick's tools, but so far I've only been using a few of its capabilities. (Searching mostly.) Time to read some more .... Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#7
|
|||
|
|||
andy I got a question related
Say you are setting values for attributed in let's say a focus gained hook an you have If value True Attribute = true False Attribute = false Attribute 2 = true Attribute 3 = true Can you just call refresh for the area at the botto. If they are all in the same refresh area or do you have to call it after each attribute and chain of commands? If I have a longer chain of code then above will it get executed fully before the refresh |
#8
|
|||
|
|||
Quote:
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#9
|
||||
|
||||
Refreshes are fairly slow, as far as code execution goes, since it needs to re-evaluate and redraw everything on the screen. So, they should not be done after every line of code unless you really have a good reason for doing so. And, unless you really need to refresh the entire screen, you should refresh just the affected areas instead.
- 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. |
#10
|
|||
|
|||
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Newbie Studio/programming questions. | jaminben | SageTV Studio | 88 | 05-02-2009 10:02 AM |