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 05-21-2009, 07:11 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Creating Arrays for tables

Okay guess please go easy on me I am trying to create an array of actors in a show/movie and then display that array in a table.

I don't think I am using the createarray() call correctly (or any of it for that matter as the results i get are the spinning circle of doom.

I am still learning but any insight would be appreciated.

Array Code
Reply With Quote
  #2  
Old 05-21-2009, 07:17 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Did you try the GetPeopleListInShowInRole() api call. It already returns an array.
Reply With Quote
  #3  
Old 05-21-2009, 07:31 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
Did you try the GetPeopleListInShowInRole() api call. It already returns an array.
Thanks for that now I guess my problem is in the table(or setting it up)

table
Reply With Quote
  #4  
Old 05-21-2009, 07:38 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
You shouldn't need the GetPeopleInShow(ActorCell)....

if i understand your code right and the way GetPeopleListInShowInRole works ...ActorCell is allready a string... so you can just have:
ActorCell
--Text Widget
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #5  
Old 05-21-2009, 07:45 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
No that's not it either. I am thinking I am not calling the array into the table correctly.
Reply With Quote
  #6  
Old 05-21-2009, 07:52 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I would take another look at the table tutorials.... I find they help me a lot when I'm my tables are not working as I think they should.
Reply With Quote
  #7  
Old 05-21-2009, 08:05 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
you also don't need the Panel Widget below ActorCell.

But i agree with stuckless... the table tutorials are a great place to go look when stuck
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #8  
Old 05-21-2009, 09:28 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
After looking over the tuturial again I swear it never gets old

I figured it out. I needed to call ActoryCell then a text widget.

thanks
Reply With Quote
  #9  
Old 05-21-2009, 12:32 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay back on this same table I am having a wierd issue.

The below circle part of the code only pulls the image for the first actor and pulls nothing for the others although I have images setup and named correctly

imageactor

It is wierd because the text call above it pulls every cell but the image call only pulls the first cell and that is it.

I know the call is working because if I put a text widget to look at the output of image the output is correct and plus it works on the first cell.
Reply With Quote
  #10  
Old 05-21-2009, 01:24 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
OKay even tried make in more "error" proof for nulls still get only the first image for the first item in the table.

imagecode2
Reply With Quote
  #11  
Old 05-21-2009, 01:41 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
change LoadImage(image) to just image.... this is the way the default stv display most (all?) of their images.


EDIT: you also arent declaring a Panel Widget for that image to exist in... this may also be one of the problems
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #12  
Old 05-21-2009, 02:19 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by PLUCKYHD View Post
OKay even tried make in more "error" proof for nulls
Your null check isn't accomplishing anything in this case because you've just set image to be the result of a string concatenation, and there's no way for that result to be null; it will always be a string (even if it's not the string you wanted).

Also, what's with the "If Focused > true > Focused" branch structure? And why is the iPos2 code reachable from both branches? Do you really want that code executed twice in the case when the item has focus? If you have code that should be executed regardless of whether the item is focused, why put that code under the If at all?
__________________
-- Greg
Reply With Quote
  #13  
Old 05-21-2009, 02:24 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Your null check isn't accomplishing anything in this case because you've just set image to be the result of a string concatenation, and there's no way for that result to be null; it will always be a string (even if it's not the string you wanted).

Also, what's with the "If Focused > true > Focused" branch structure? And why is the iPos2 code reachable from both branches? Do you really want that code executed twice in the case when the item has focus? If you have code that should be executed regardless of whether the item is focused, why put that code under the If at all?
I figured that on the null just double checking myself probably not needed.

The if focused>true branch structure is how I have coded in tables as that is how the original Sagemc video library was coded so I kind of stuck with it.
ipos2 is reachable in both places by my accident and is corrected.

I still can't understand why it will only pull the first image. I tried added a panel widget and just calling image instead of load image but nothing seems to help.
Reply With Quote
  #14  
Old 05-21-2009, 04:11 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I am really banging my head against the wall on this one it is really confusing

The table is actor names I know it works because if I pick a movie title where the actor is the first one listed it will show their picture but if I pick a movie where they are say third of fourth in the table it does not pull the picture althrough checking the output of the string by putting a text widget shows it to be still correct but no picture

Reply With Quote
  #15  
Old 05-22-2009, 10:07 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Bueller? I am not getting anywhere is seems on this.
Reply With Quote
  #16  
Old 05-22-2009, 11:08 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I would use DebugLog on your ActorCell and then on your image variable. That way you can tell several things...
1. Is ActorCell something that contains "--"
2. Is image resolving to a valid filename (ie are you not parsing it correctly, is there extra spaces, etc)
3. Is your branch being executed

Personally I find logging to be a very effective way to troubleshooting these types of issues.
Reply With Quote
  #17  
Old 05-22-2009, 11:31 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Yeah that is what gets me is I checked that and it is right.

That is why it does load the correct image on the first item of the table

For instance if it is "Jennifer Aniston"

The image variable returns

\stvs\sagetv3\....\\actorimages\Jenifer Aniston.png

(the .. I am just abreviating )

So it gets the picture

If I go into another movie and say she is the third in the table the image variable still returns correctly but no picture is display but that screens first actor is still pulled correctly.
Reply With Quote
  #18  
Old 05-22-2009, 11:37 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I'd bet that when Jen is listed at item #3 in a actor array, you are not parsing the data you think you are parsing. That's where debug log will come in handy. You will quickly see if the filename/data is correct.... keep in mind, that a simple space will cause the whole thing to fail. If it hits the same code for the first item, vs the second item, then the only difference is the data going in which results in image comming out.
Reply With Quote
  #19  
Old 05-22-2009, 11:50 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I'd bet that when Jen is listed at item #3 in a actor array, you are not parsing the data you think you are parsing. That's where debug log will come in handy. You will quickly see if the filename/data is correct.... keep in mind, that a simple space will cause the whole thing to fail. If it hits the same code for the first item, vs the second item, then the only difference is the data going in which results in image comming out.
Okay now we are on to something thank you for the debug log I wasn't doing it right
here is the return
log

Look at the second one why in the world is it putting that symbol before it and how do I get rid of it?

thanks
Reply With Quote
  #20  
Old 05-22-2009, 11:52 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay I know if I got starting 1 on the second and so on it will work

But I don't know what that symbol is to make sure I don't parse it from the first actor
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
Resizing Tables bialio SageTV Studio 5 01-22-2008 01:17 PM
Building arrays of arrays in Studio evilpenguin SageTV Studio 2 02-15-2007 11:58 AM
Troubling Tables kuch68 SageTV Studio 5 09-13-2006 01:06 PM
Working with Arrays src666 SageTV Studio 2 11-12-2005 08:15 AM


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


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