![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Troubles with If...
Hello,
I've been trying to use the Utility If call to determine if an object is a MediaObject or not. The java docs quite clearly states that: Returns the second argument if the first argument is true, otherwise the third argument is returned. All 3 arguments will be evaluated in all cases. This does NOT have a short-circuit which prevents evaluation of the third argument if the first is true. Is there an equivalent call that will provide a short-circuit so it doesn't evaluate the third argument if the first is true? Cheers Ben Edit: Never mind we got around it another way.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 01-30-2010 at 10:01 AM. |
|
#2
|
||||
|
||||
|
By definition, a method call always evaluates all of its arguments, before the method itself is invoked. So no, there's no way to write an If() method that doesn't do that; it's a fundamental part of the language, not a quirk of that particular method. The only way to avoid evaluation is to use the Conditional widget control stucture to skip over whole lines of code.
__________________
-- Greg |
|
#3
|
|||
|
|||
|
Ahhh, thanks for the explanation......I did wonder but now I know for sure
![]() Cheers Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tuning troubles | jsschrstrcks | SageTV Software | 9 | 02-26-2009 10:27 PM |
| HDHomerun troubles | pvr599 | Hardware Support | 7 | 09-13-2007 02:58 PM |
| FF/REW Troubles with HD | scoful | SageTV Software | 6 | 03-03-2007 08:19 PM |
| Placeshifter Troubles | crazymateo | SageTV Linux | 1 | 12-15-2006 10:42 PM |
| Troubles with FSE | Sten3danny | SageTV Software | 4 | 12-03-2005 02:51 PM |