|
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
|
|||
|
|||
Studio API question
This is more of a Java question than an API question. In the following code snippet, I am calling an API function that should return a boolean value. Unfortunately, I'm not sure how to cast the returned object to a boolean. Does anyone know how to do this?
thanks. Code:
public static boolean DeleteFile(Object mediafile) throws InvocationTargetException { try { Object obj = SageTV.api("DeleteFile", mediafile); <how do i cast obj to boolean so I can return it?> return <the new boolean value>; } catch (InvocationTargetException ite) { throw new InvocationTargetException(ite,"Exception caught"); } } |
#2
|
||||
|
||||
Quote:
Check out my SageTV.api() wrappers in the nielm_sageutils.jar package (source in CVS) specifically the booleanApi function... The Object return value is cast to a Boolean object, then Boolean.booleanvalue() is used to return the real boolean value... (This is also how it is done for Long, Integer, Float, Double etc etc)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#3
|
|||
|
|||
I'll check that out. Thanks for the help.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|