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 03-24-2008, 01:48 PM
Thraxius Thraxius is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 77
Quick Question

This command does not work and I was wondering what I need to do to get the desired results:

Code:
pos = StringLastIndexOf(ChangerLoc, " ")
The problem is I need to parse the information in ChangerLoc at a <space>. What command do I need to use. I know for a file separator you can use this java_io_File_separator. Is there something like that for space?
Reply With Quote
  #2  
Old 03-24-2008, 04:11 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Works for me when I try in Expression Evaluator. What's your evidence for thinking it doesn't work? Have you verified that ChangerLoc is a String and contains the text you think it contains?
__________________
-- Greg
Reply With Quote
  #3  
Old 03-24-2008, 05:18 PM
Thraxius Thraxius is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 77
Hmmmm...

Well this is what I have done. I did a ChangerLoc = GetElement(DVDLoc, 0). Now when I do a ChangerLoc with a Text under it. It returns the information I am looking for on screen. It shows me. Changer1 199

What I need to do is split that up so I can do some evaluation and manipulation of it. I need to turn Changer1 199 into "199 Changer 1" Problem is when I do pos = StringLastIndexOf(ChangerLoc, " ") Then do Location = Substring(ChangerLoc, 0, pos). I get nothing in the variable Location. Using tracer is not helping me either.

DVDLoc
ChangerLoc
Location
Slot

are all attributes that are created for the page.
Reply With Quote
  #4  
Old 03-24-2008, 07:23 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Thraxius View Post
Well this is what I have done. I did a ChangerLoc = GetElement(DVDLoc, 0). Now when I do a ChangerLoc with a Text under it. It returns the information I am looking for on screen. It shows me. Changer1 199
OK, where does DVDLoc come from? Is it an array of Strings, or an array of something else that happens to be convertible to a String by the Text widget? The docs for StringLastIndexOf don't say anything about automatically converting non-Strings to Strings, so you should probably make sure what you're passing in really is a String (i.e. an instance of java.lang.String). You can find out by doing java_lang_Class_getName(java_lang_Object_getClass(ChangerLoc)). Use the DebugLog API to print out the result to the debug log.

Similarly, check the pos result from StringLastIndexOf to see if that's what you expect. Basically you just need to break your code down into minimal steps and examine the input and output of each step to find out exactly where it's going wrong.
__________________
-- Greg
Reply With Quote
  #5  
Old 03-24-2008, 09:18 PM
Thraxius Thraxius is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 77
Thanks

Thanks for you help. DVDLoc is created from DVDPro2Sage.

It is an array from DVD Disc section.

[Changer1 188, Changer1 189, Changer1 190]

That would be the response that is passed into DVDLoc. I can retrieve the data out by doing a getElement. I will try to implement what you said to determine what that array is made of.

I just want this to over. I am not cut out for this work. My mind hurts.
Reply With Quote
  #6  
Old 03-25-2008, 06:19 AM
Thraxius Thraxius is offline
Sage Advanced User
 
Join Date: Jan 2007
Posts: 77
Found It

Hello, after a good nights sleep I found what I needed. It was a simple typo. I had a lower case Of.
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
Quick and Simple Placeshifter Question AzJazz SageTV Placeshifter 5 03-07-2008 02:33 PM
Quick question regarding Fios and needed Hardware Target Hardware Support 2 02-08-2008 08:20 AM
Quick recording question jediraverz SageTV Software 2 12-20-2007 08:25 PM
A Quick Question (IPTV, Multicasting, Etc) asthepenguinfly SageTV Software 2 12-13-2006 03:39 PM
quick question regarding HD mbedford Hardware Support 1 07-19-2006 01:40 AM


All times are GMT -6. The time now is 06:09 PM.


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