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 07-01-2006, 11:44 AM
afinemetsfan afinemetsfan is offline
Sage User
 
Join Date: Jul 2005
Posts: 26
Populate table with arraylist

I have an arraylist which I would like to import to a table column, whats the best way to do this? I know that i need to create some sort of getarraylist method - but what should be in it?

Thanks
Reply With Quote
  #2  
Old 07-01-2006, 01:34 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
For a vertical 1D table, just feed the list to the Table widget (i.e. put an action widget above the table, with an expression that yields the list as its value).

For a column of a 2D table, you'll need code in your Cell component chain to calculate the correct cell contents based on row and column indices.

The tutorial STV is worth a look if you haven't already done so. There are working examples of both kinds of table in there.
__________________
-- Greg
Reply With Quote
  #3  
Old 07-01-2006, 03:15 PM
afinemetsfan afinemetsfan is offline
Sage User
 
Join Date: Jul 2005
Posts: 26
Ive looked through the tutorial, but Im not really sure how GetRecodingQualities() works. Can you give me an example of an expression which yields the list as its value? Do I need to call a method which returns the list?

Thanks
Reply With Quote
  #4  
Old 07-01-2006, 03:19 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
GetRecodingQualities() returns a list that can be used for a table & is used in the default STV if you want to see sample code for it. The default STV contains example usage of a LOT of API calls.

- 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.
Reply With Quote
  #5  
Old 07-02-2006, 10:39 AM
afinemetsfan afinemetsfan is offline
Sage User
 
Join Date: Jul 2005
Posts: 26
Can I feed a list into a table. or does it have to be an array? If im calling Get Title(). will it work with a Table? I am having trouble populating the list into sage though...any suggestions would be great.

EDIT: problem solved, I was assuming that the main method of a class got called, when it never did.

Thanks



Code:

static List Title = new ArrayList<String>(); //decaled above main

//In main method
...
Title.add(dnload.getChild("TORRENT").getChild("NAME").getText());
...

   public static List<String> GetTitle()
   {           
    return  Title; 
    }

Last edited by afinemetsfan; 07-02-2006 at 11:20 AM.
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


All times are GMT -6. The time now is 03:59 AM.


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