SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

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 02-21-2008, 04:30 PM
wado1971's Avatar
wado1971 wado1971 is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Stamford, CT
Posts: 345
How do I 'getwidgeproperty' value?

ok - I've managed to stumble around long enough in studio to come up with a working stvi (thanks to GKusnick tools).... But now I'm stuck and need some basic help/direction. My final goal is to get properties from existing widgets (panels) and then set these properties to variables which I can manipulate. I've attempted to use the std widget actions get&set-widgetproperties within studio with no success & much frustration. I'm now at the point where I think my approach & assumption of how studio works is in error (I'm a newbie to studio & no java knowledge - sorry ).

Questions: 1) Do I need to know java to accomplish the above goal or can I do all the work within studio? 2) Do I need flachbar or Gkusnick tools? 3) I've attached my attempt at simply getting a property value within an stv which I can't get to work - can you tell me why?

thanks in advance,
wado
Attached Images
File Type: jpg getprop.JPG (70.0 KB, 167 views)
Reply With Quote
  #2  
Old 02-21-2008, 04:42 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
To use Get/SetWidgetProperty, you need an actual Widget object, i.e. a Java object of class Widget. You get Widget objects by calling WidgetAPI methods that return objects of that type. Just typing in a widget name or path won't do it. (If you type it in with quotes, you have an object of type String; if you type it without quotes, you most likely have a syntax error.)

But what's your purpose in trying to manipulate widget properties in this way? Why not just set the properties manually to dynamic expressions like "=somevar" and then manipulate the value of somevar? That should accomplish anything you might want to do in the way of dynamically adjusting widget layout at runtime.
__________________
-- Greg
Reply With Quote
  #3  
Old 02-21-2008, 07:40 PM
wado1971's Avatar
wado1971 wado1971 is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Stamford, CT
Posts: 345
Thanks for the reply. The end product will achieve something like the attached jpg all done with stviís. Iíve got the weather & integrated_diskspacebar complete with stviís and now Iím trying to resize the existing MainMenuContainer & the other various property changes you see (all existing properties in the stv). Of course I could just manually change the properties in studio but this is much more fun

Ö..So now I reread my original statement and realize I should restate by goal. I guess my goal is not to dynamically adjust widget layout but to retain a layout I like for future upgrades. My initial idea was to create a stvi which assigned all these existing properties a variable and then set the variable to my liking. Bad approach? / Not worth the effort?

From the sounds of your first comment Iím way off base and should probably do a bit of poking around in a java book..?..
Attached Images
File Type: jpg stv_screen.JPG (99.2 KB, 161 views)
Reply With Quote
  #4  
Old 02-21-2008, 09:34 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Maybe I misunderstood what you're trying to do. If the idea is to change properties of existing widgets at STVImported time, you can do that using the SetWidgetPropertyEx function in my STVI tools. This function does take a widget path (in quotes), so you don't need to use WidgetAPI calls to get a handle on the widget itself.

Code:
MyMenu
  STVImported
    gkusnick_sagetv_studio_STVI_SetWidgetPropertyEx(stvi, "path", "propname", "propval")
Per the STVI docs, this dummy STVImported will get folded into the generated STVImported code when you do Export As STVI.

So when you say "set these properties to variables which I can manipulate", what you mean is to set the property value to a dynamic expression that references a variable, is that right? I.e. you want to change the property value (at STVImported time) from "0.8" or whatever to "=somevar", so you can then adjust the value of somevar programmatically at runtime. In that case, we are talking about the same thing after all. I just wasn't getting that from the Studio screenshot you posted earlier.
__________________
-- Greg
Reply With Quote
  #5  
Old 02-22-2008, 07:26 AM
wado1971's Avatar
wado1971 wado1971 is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Stamford, CT
Posts: 345
Got it!

Supper cool stuff - thanks for the help!

rob
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:47 PM.


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