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 01-06-2006, 04:26 PM
jbuszkie's Avatar
jbuszkie jbuszkie is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Westminster, MA
Posts: 938
Execution order for UI widgets...

I had a similar issue before and it seemed to work of with a workaround... but now I'm think I have the same issues and I can't get it to do what I want....

I have the something like this..

Code:
if (A)
    action (B=false)
        action (C=false)
.
.
.
                      action (F= false)
                            UI (some UI panel)

if (B || C || ....)
 UI (some other UI panel)
it seems like the second if statement get evaluated before all the variable are set in the first chain.

Is there a way to force the whole chain to get executed before the if evalutes the second if?

In my previous delima I used an

Code:
if (false)
  text (untitled)
and that fixed my issue.. Not so in this case...

Can I put nested action (REMS) before the if statement like

Code:
action ("REM")
   action ("REM")
       action ("REM")
          action ("REM")
.
.
.
                   IF (B || C ||...)  (the second if)
Would that work? (I guess I'll just try it but I'd like to not waste too much time)


Jim
Reply With Quote
  #2  
Old 01-06-2006, 04:42 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
I may well expose my lack of knowledge about Studio here...

I think the problem is that those variables are made available "upstream". So bascially you set them in the first chain, but since they are children, the second can't see them.

What you want to do is create Attributes for each variable (name A, B, C, etc) and place them at the same level (siblings) of the "if" widgets (or higher if you want them available elsewhere).
Reply With Quote
  #3  
Old 01-06-2006, 04:42 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
They should be executed in the order they are listed. You show the first If statement as checking A. If that is false, then the entire tree would be skipped before going on to the next If statement. Without seeing actual code, I can't think of anything else at the moment. The variables/attributes also have to be defined at a shared parent location.

- 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
  #4  
Old 01-06-2006, 08:29 PM
jbuszkie's Avatar
jbuszkie jbuszkie is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Westminster, MA
Posts: 938
Quote:
What you want to do is create Attributes for each variable (name A, B, C, etc) and place them at the same level (siblings) of the "if" widgets (or higher if you want them available elsewhere).
I do have the attibute widets! I just didn't mention that.. :-)

Quote:
They should be executed in the order they are listed. You show the first If statement as checking A. If that is false, then the entire tree would be skipped before going on to the next If statement. Without seeing actual code, I can't think of anything else at the moment. The variables/attributes also have to be defined at a shared parent location.

- Andy
"A" is true. I have a breakpoint set right below the first "if" I can see it step through all the varaible assignments.. then it jumps right to the UI panel below the second "if". So somehow the second "if" must have gotten evaluated before the the first variable assignment in the first "if".
It's pretty weird..

UhOh... I just found my problem.... I"m a moron I *cough* misspelled *cough* a variable *cough* in my variable assignments *cough*

It works just fine now.. Althought the single step jumps all over the place! But it works.. so I don't really care!


Jim
Reply With Quote
  #5  
Old 01-07-2006, 05:38 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by Opus4
They should be executed in the order they are listed.
... except that action chains leading to text widgets are executed before action chains leading to other UI widgets, which can cause some out-of-order execution.

You can use your advantafe this by having first an action chain leading to a text widget with an IF (false) parent (so that it does not get shown), being used to calculate A,B,C.. etc, and having attributes A,B,C etc on the top level panel.
The values of A,B,C will then all be set before the rest of the tree is rendered.

See the disk space bar in the title bar for an example,
and also:
this post
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #6  
Old 01-07-2006, 10:08 AM
jbuszkie's Avatar
jbuszkie jbuszkie is offline
Sage Fanatic
 
Join Date: Aug 2003
Location: Westminster, MA
Posts: 938
Quote:
Originally Posted by nielm
See the disk space bar in the title bar for an example,
and also:
this post
That was my post the first time I encountered this problem!! That's why I though I understood it! Stupid typo!! Thanks for the help though...
Reply With Quote
  #7  
Old 01-07-2006, 11:36 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
I should read better too I had not realised you had solved your problem!
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
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
Change Order of Capture Cards Tofu SageTV Software 9 11-22-2006 01:27 PM
Changing Device Order scsailor SageTV Beta Test Software 4 11-11-2006 08:36 PM
Removing garbage widgets from STV dflachbart SageTV Studio 11 05-10-2006 09:10 AM
Playing music in order it appears? jettman SageTV Software 4 02-14-2006 05:01 PM


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.