|
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
|
|||
|
|||
Newbie Studio/programming questions.
I'm very new to Studio and programming in general and would very much like to learn how to use the tools made available for editing SageTV and Sage only, I'm not looking at learning to do any other sort of programming.
The biggest problem I have is understanding the java docs and what each widget requires to work, so for example: AddStaticContext public java.lang.Object AddStaticContext(java.lang.String Name, java.lang.Object Value) Breaking it down: Public = ?? (what does this mean) java.lang.Object = ?? (what object) java.lang.String Name = ?? java.lang.Object Value = ?? The only way I can currently use it is to copy other peoples code then mess around with it 200 times until it actually does something I want. But by doing this I'm not actually understanding what it is I'm doing or even learning how to use it correctly. Is there a good guide someone can recommend that will expain what all these different terms mean? Am I setting my sights too high and should I be starting further down the ladder? Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#2
|
|||
|
|||
When using an attribute widget I see various methods entered into the value box.
null "" Attribute = AiringForBackground Value = AiringForBackground What do these mean? null = searches for anything? "" = ?? When the Attribute and Value are the same = references Objects(?) further up the widget tree and allows the use of the result elsewhere? Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#3
|
|||
|
|||
When making my imports I use:
Code:
GRSOptionsPanel != "LayerOne" Code:
HasMediaFile() && (DisableVideoPreview != true) Code:
phoenix_api_IsFanartEnabled() && AiringForBackground != null How do you know what to put in the () Sometimes I see things entered in between and other times I dont. Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#4
|
||||
|
||||
Quote:
The Name and Value are parameters for that call and are described as part of the details for the call in the docs. "String" and 'Object" are just the variable types it will use; 'Object' can be just about anything. - 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. |
#5
|
||||
|
||||
Quote:
Setting it to its own name retains its last value if it happens to be cached (such as when returning to a menu you used previsouly), or null if it isn't yet set & cached. - 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
|
|||
|
|||
I've just started work on a new import and I'm writting this one from scatch (no hack'n'slash), not a good idea considering my above posts. Anyway the idea is to create a screen which only shows TV recordings where there is more than one file present for that particular show. I see referenced in almost all other screens "Ariring", which when used with:
Code:
phoenix_api_GetFanartBanner(Airing) Image Widget I've attached a screenshot of the code I've used to so far create the screen and pick out all these +1 recorded shows. However I cannot get the banner artwork to work using "Airing". The only way that it works for me is to use: Code:
phoenix_api_GetFanartBanner(GetElement(GetSubgroup(RecordedFiles, GroupedFiles), 0)) Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#7
|
||||
|
||||
Quote:
You are talking about comparisons, where '==' means "Is equal to?" and '!=' means "is not equal to?", '&&' is "AND". Such comparisons have a precedence order, but parentheses can override that or simply make it clearer which comparisons you want done first... sort of like using them in math, where 5 + (7 * 3) equals 5 + 7 * 3 But (5 + 7) * 3 does not equal 5 + 7 * 3 - 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
|
||||
|
||||
I had previously had some programming classes in Ada and used that to write a solid state diffusion computational model for my dissertation, so that helped a lot. But to get familiar with Java, I picked up 'Head First Java' at flachbar's recommendation. You may need to find a more basic Intro to Programming book first in some simple language (might as well stick with Java for this). I don't recall how much prior knowledge was assumed for the Head First book.
Aloha, Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#9
|
|||
|
|||
Thanks Andy, thats given me something to think about, no doubt I'll read your replys a few dozen times tonight
Quote:
Any ideas about post No.6? P.s If you ever need your home rewired then I'm your man, you'll have to pay for the flights though
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 04-24-2009 at 02:53 PM. |
#10
|
||||
|
||||
RE:Post 6
Airing is just another variable defined in that screen. It could have been name Elephant. As a result of the logic leading up to that point, the Airing variable contains the sage Airing Object for the show of interest. You have to set up all of that logic in your screen. Aloha, Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#11
|
|||
|
|||
Quote:
I've updated the screenshot highlighting what I used to make the ShowTitle work when highlighting a TV Series. Also, as I can transfer the ShowTtitle and display it, why when adding: Code:
phoenix_api_GetFanartBanner(ShowTitle) Image Widget Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#12
|
|||
|
|||
Quote:
Regarding this, you might want to take a look at Sage Job Queue. It's another thing to setup but it's based on a very basic programming language structure such as above. Slugger has done a really good job of making the language easy to understand and his how to's and documentation are fantastic. Most of the SJQ users have never touched any programming code and are usually up and running with some basic code sets in a half hour or so. It's a pretty quick way to get your basic programming foundation in order and it's a utility you will probably really like and end up using. |
#13
|
|||
|
|||
I've never seen this before, it looks very complicated but I'll give it a go tomorrow. The documentation is absolutely great, especially the "Available Tests" and "Example" sections.
Thanks for pointing this one out 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 |
#14
|
|||
|
|||
Quote:
It took awhile but I now have the ability to use the Sage API "Show" with Airing i.e GetShowTitle, GetShowYear and best of all phoenix_api_GetFanartBanner(Airing) etc. I'm still having an issue with only using a "RefreshArea" action but I'm going to take a wild guess and say I need to be using "GetFocusContext()". Any more tips Mike? Your hints always did get the job done in a timely fashion, not too easy but not too hard I've attached a screenshot of the code. Cheers Ben Edit: Perhaps I'm trying too hard but I've changed the "RefreshArea" to just "Refresh" and although it does work it becomes slower to navigate. Any pointers on which is the best method to refresh the focused items data/images. Edit 2: Just thought I'd say thankyou for all the help I've had tonight, its come in very handy. I've atached another screenshot showing what it looks like now, obviously some of the text is incorrect but it shows the look I'm after. Its 04.15 so time for bed Thanks again.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 04-24-2009 at 09:17 PM. |
#15
|
||||
|
||||
Quote:
Bear in mind that the expressions you see in widget code are not strictly speaking Java, but the general concepts and expression syntax are similar. You really can't get very far in Studio coding without understanding the fundamentals of programming, i.e. variables, expressions, function calls, and so on. So whether or not you plan to do any programming outside of Studio, you do need to master the basics.
__________________
-- Greg |
#16
|
|||
|
|||
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 |
#17
|
|||
|
|||
Glad you figured out your airing issue
I noticed you are not addingstaticcontext How are you setting your airing and such? Also you might want to name your refresh sections different from you set variables ie episodecount As for the refreshing it looks right to me maybe there is an easier way to do it I would like to know as i do the same and call out all of the areas i need refreshed in focus gained. I had figured out most of what you posted I guess video library was a little more detailed in that area. I am by now means on expert I use to code in c++ heavily but that was 12 years ago I code reports daily in Crystal reports which gives me a great understaning of some of the calls but I am still confused at times. |
#18
|
|||
|
|||
Thats what I'm reading about now but its not making much sense just at the moment. I think this would be the correct way to do it but I'm only guessing.
Using a FocusGained hook and Code:
Airing = (GetElement(GetSubgroup(RecordedFiles, GroupedFiles), null)) Why? I only picked that name so I could remember what it was for, I'm not sure if its wrong or right but it does work.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#19
|
||||
|
||||
AddStaticContext() is used to pass variables to another menu. So if you wanted to pass the current contents of Airing to another menu, you would call
Code:
AddStaticContext( "Airing" , Airing) Also, I suggest going through all of the Studio tutorials if you haven't done it yet. They are very helpful for getting a handle on the basics. Aloha, Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#20
|
|||
|
|||
Thanks Mike, that makes sense....sort of I haven't gotten as far as adding the link for the following menu so I'll leave that alone for now.
I've noticed some discrepencies in my code which isn't allowing me to view recorded TV as well as imported TV shows Back to the drawing board I guess.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Studio and SageMC Questions | bama | SageMC Custom Interface | 4 | 07-26-2008 01:11 PM |
Silly Newbie Question: Starting Studio | willetin | SageTV Studio | 2 | 01-05-2008 08:21 AM |
Studio Newbie Question | mightyt | SageTV Studio | 4 | 01-30-2006 01:52 AM |
Some questions about the upcoming Studio. | ToxMox | SageTV Customizations | 26 | 06-08-2004 09:00 AM |