Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Level 11

Weird: roInt.ifIntOps vs roInt.ifToStr ?

roInt implements 3 interfaces: ifInt, ifIntOps, ifToStr.
The bizarre thing is that both ifIntOps and ifToStr manifest only one and the same method: toStr()!
And it's not that the documentation is wrong here, since i can check both are there:
BrightScript Debugger> ? getInterface(1, "ifIntOps"), getInterface(1, "ifToStr")    
<Interface: ifIntOps>           <Interface: ifToStr>

BrightScript Debugger> ? 1.ifIntOps.toStr(), 2.ifToStr.toStr()
1               2

What's going on here, why the double work?
0 Kudos
1 REPLY 1
TheEndless
Level 10

Re: Weird: roInt.ifIntOps vs roInt.ifToStr ?

The ifToStr interface was just added in 7.0 (and a welcome addition, indeed!).  I imagine both interfaces use the same function on roInts, in which case there wouldn't be any double work, just backwards/legacy compatibility.
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)
0 Kudos