|
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
|
||||
|
||||
STV string to long questions
Basically what i'm trying to do is write a long type to the properties file and then read it out and do some math to it. So... how do I do that
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink) |
#2
|
||||
|
||||
I vaguely recall that if you multiply by 1, the data type will be converted from a string to the appropriate numeric type in the variable you write the value to. I guess you can just work with the new variable from there on.
Something like: Code:
temp = GetProperty() * 1 I don't know if this answers your question or not. Of course I am probably totally wrong anyway... Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#3
|
||||
|
||||
__________________
-- Greg |
#4
|
||||
|
||||
Multiplying by one is all that should need to be done, though, since the property is read in as a string and I had no problem getting a large number represented as a string to be converted to a long via ("number" * 1).
I suppose if the number might be small, you may need to force it to be a long, so just use the GetProperty() call as the single parameter to java_lang_Long_parseLong(): java_lang_Long_parseLong( GetProperty() ) I would think that would do it in all cases. - 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
|
||||
|
||||
Perfect, thanks guys
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|