|
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
|
|||
|
|||
Calling methods on "Custom" Objects
Can you invoke methods on custom objects you are manipulating in studio?
For example, lets say one of static methods returns a List<CustomObject> which I use as the basis for a table. Inside of the table, each cell is set to an instance of CustomObject. Can I invoke a method on that object? I tried CustomObject_method() - which would return a string value - but it did not seem to execute that. I know I can have a static CustomObject.Method(CustomObject) method - and build that to perform the same action as the non static method.. But, I wanted to know if it was possible to invoke methods on custom objects in sage without resorting to that type of refactoring?
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#2
|
||||
|
||||
Quote:
ObjectReference = intance of sagex.phoenix.MyCustomClass sagex_phoenix_MyCustomClass_MyNonStaticMethod(ObjectReference, AnyOtherArg1, AnyOtherArg2,...) If the method is static, then you do not need the ObjectReference, but the syntax is the same.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
|||
|
|||
Ahh.. Ok, makes sense. Not much more convenient than having static method instead.
Thanks.
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#4
|
||||
|
||||
This is covered on p. 151 of the Studio manual.
__________________
-- Greg |
#5
|
|||
|
|||
Thanks GKusnick - I looked through the manual but this particular part of method invocation still was not clear to me. But I see it there and understand it now.
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#6
|
||||
|
||||
It's also worth noting that to create a new Object from Studio use the full package and class name prefixed with new_
So if your class is Code:
com.package.my.CoolClass { void aGoodMethod(String S) { } } Code:
MyObject = new_com_package_my_CoolClass() Code:
com_package_my_CoolClass_aGoodMethod(MyObject, "the String")
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lost "Send To Custom Group" in My Videos | BFisher | SageMC Custom Interface | 1 | 02-07-2009 09:12 AM |
Is it possible to connect SageMC "Movie Now" menu to 1 of the custom button? | thenewguy1979 | SageMC Custom Interface | 2 | 09-19-2008 11:07 PM |
"Set defaults" for Series forgets "Keep"/"Auto-delete" setting | maxpower | SageMC Custom Interface | 9 | 05-14-2008 09:44 PM |
Made a custom Aspect Ratio to "add overscan" on the HD100 | Slipshod | SageTV Media Extender | 8 | 03-27-2008 07:04 PM |
Change text of "Malore Custom Menus"? | YellowBox | SageTV Customizations | 0 | 08-14-2004 08:15 PM |