EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2014
05:08 PM
objFun() = no fun
I was trying to figure out how to use objfun - my understanding is that - given object interface, method name and parameters - it will call said method and return the result. Except i have no luck pleasing it, it seems to insist on at least 3 arguments (object + interface + method_name?) but even then says "member function not found".
So far the only thing i discovered is YAWRR (Yet Another Way to Reboot Roku):
So far the only thing i discovered is YAWRR (Yet Another Way to Reboot Roku):
BrightScript Debugger> ? objfun([], "", "")Should've made career in test engineering, for things seem to fall apart in my hands w/o even trying.
Connection closed by foreign host.
8 REPLIES 8

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2014
06:50 PM
Re: objFun() = no fun
What the heck is objFun(), and how in the world do you find these obscure things?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

kc8pql
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2014
06:56 PM
Re: objFun() = no fun
^ I was wondering about that myself...
____________________________________________________________________________________________________________
No, I don't work for Roku.
Netflix Player N1000X, XDS 2100X (premature death by lightning)
Roku2 XD 3050X, Roku2 XS 3100R, Roku2 4210R
No, I don't work for Roku.
Netflix Player N1000X, XDS 2100X (premature death by lightning)
Roku2 XD 3050X, Roku2 XS 3100R, Roku2 4210R
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2014
12:28 AM
Re: objFun() = no fun
"TheEndless" wrote:
What the heck is objFun(), and how in the world do you find these obscure things?
Why, by reading some apocryphal bright-scriptures. That's where i learnt about the constant global and ifGlobal too. Not everything has made it into the canon. ObjFun is related to GetInterface and you can see it as a reserved word... if someone had bothered to include the list of reserved words in the wiki!
By the way, i came with this idea of a game/challenge: "YAWRR Code Golf". It's a code golf, where the goal is to write the shortest code that forces Roku player to reboot. I submit my entry from above - only 16 characters, can someone best that? (Benefit for RokuCo in this code golf is they could patch the issues found, if they see fit)

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2014
12:59 AM
Re: objFun() = no fun
"EnTerr" wrote:
Why, by reading some apocryphal bright-scriptures.
Ahh.. the legacy BrightSign documentation.. gotcha.
"EnTerr" wrote:
I submit my entry from above - only 16 characters
I can't get that to crash mine. :?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2014
12:15 PM
Re: objFun() = no fun
"TheEndless" wrote:"EnTerr" wrote:
I submit my entry from above - only 16 characters
I can't get that to crash mine. :?
Doh!
Do you by any chance live by Lake Wobegon ("where all the women are strong, all the men are good looking, and all the children are above average")?
For me it worked reliable on Roku 2xxx, 3xxx, 4xxx (fw 3 and 5, tested from console).
The runner-up for YAWRR CodeGolf i know is 24 chars but discovered by you.
gcolin59
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2018
01:19 PM
Re: objFun() = no fun
di = createObject("roDeviceInfo")
iface = getInterface(di, "ifDeviceInfo")
print objFun(di, iface, "getModel")
Will do the same thing as:
print di.ifDeviceInfo.getModel()
iface = getInterface(di, "ifDeviceInfo")
print objFun(di, iface, "getModel")
Will do the same thing as:
print di.ifDeviceInfo.getModel()

georgejecook
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018
07:20 AM
Re: objFun() = no fun
why not use callfunc ? https://sdkdocs.roku.com/display/sdkdoc/Handling+Application+Events
George Cook
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook
Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook
Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
gcolin59
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018
09:37 AM
Re: objFun() = no fun
One cannot callFunc() against an object like roDeviceInfo AFAIK