Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Roku Guru

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
Channel Surfer

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: - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos