I was testing my channel on an older Roku running Firmware 3.1 and got this error
Member function not found in BrightScript Component or interface. (runtime error &hf4) in …G56RN/pkg:/source/appMain.brs(98)
098: busydialog.EnableOverlay(true)
which leads to two questions.
Is there a way to check if an function is available before calling it? For example in javascript you could do this
if (busydialog.EnableOverlay) {
busydialog.EnableOverlay(true)
}
The global function FindMemberFunction is described to return “Invalid” if the function does not exist, or otherwise a reference to the interface defining the function. I do not know from what version FindMemberFunction is available, though.
FindMemberFunction(object as Object, funName as String) As Interface
FindMemberFunction has been around for many years. To be exact, the old release notes in the SDK documentation says it was added in Roku OS version 6.1 - 12/04/2014.
Generally speaking, for any function that is documented in the current SDK BrightScript reference without any annotation regarding it only being added in a recent firmware version, you can take its availability for granted.