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 06-12-2009, 07:44 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Can someone help a poor newbie

"WeatherIcons\\Images\\" + tv_sage_weather_WeatherDotCom_getCurrentCondition(WeatherInstance, "curr_icon") + ".png"

Can someone explain to me what's going on in this line... hopefully then it will all click.
Reply With Quote
  #2  
Old 06-12-2009, 07:50 AM
mtyme mtyme is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 98
I know nothing about studio, but based on programming background, it appears it's calling a function called tv_sage_weather_WeatherDotCom_getCurrentCondition() with the parameters of WeatherInstance, "curr_icon" to get the current conditions image name.

Find that function (or whatever it's called in studio) and you'll see how it works.
Reply With Quote
  #3  
Old 06-12-2009, 08:04 AM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
The expression: "tv_sage_weather_WeatherDotCom_getCurrentCondition(WeatherInstance, "curr_icon")" is calling a custom java function called "getCurrentCondition" and passing it the parameters "WeatherInstance" and "curr_icon". That function is not part of the SageAPI, so it is not documented, but it apparently returns a string (and if you don't know what a string is, it is just a variable that contains text - a collection of letters and numbers).

The three strings are than concatenated (joined) together by the plus (+) operators. So if the function returned "rain", you would get "WeatherIcons\\Images\\rain.png".

The double slashes are because java uses the slash as an escape character, so you need to put an extra one in to make it get treated as text.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #4  
Old 06-12-2009, 09:28 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Thanks so much!

I have seen the light!
Reply With Quote
  #5  
Old 06-12-2009, 10:55 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Tiki View Post
The double slashes are because java uses the slash as an escape character...
While it's true that Studio code, like Java and other C-derived languages, uses backslash as an escape character in string literals, you should not get the idea that Studio expression code is Java. There are important differences (such as the use of underscores instead of dots in fully-qualified method names).
__________________
-- 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Poor hd playback. utekineir SageTV Beta Test Software 8 12-14-2006 07:41 AM
Poor picture? Merlin SageTV Software 12 11-23-2006 01:30 AM
Poor TV out Quality Mav SageTV Software 17 09-17-2005 07:33 AM
Frustrated! Poor Live TV quality (newbie) bo989 Hardware Support 64 12-20-2004 01:24 PM
Poor Audio leswilkinson SageTV Software 0 08-02-2004 01:13 PM


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


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