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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yonikes
Visitor

Unclear documentation regarding boolean as a return code

Hi,

I'm new to BS so forgive me if i"m missing something obvious.

I came across many functions which are documented as returning boolean, but their documentation does not specify what is the meaning of this returned value. For example, the HttpAgent Interface supports this function:

AddHeader(name as String, value as String) as Boolean

But it's not mentioned how should one asses this return status. am I to guess that true is success and false is failure?

Thanks!

Yoni
0 Kudos
2 REPLIES 2
Komag
Roku Guru

Re: Unclear documentation regarding boolean as a return code

A lot of times it doesn't matter, I think, and it's there just for testing/diagnostics. But I guess, depending how you program your channel, maybe in some cases its useful for functionality.
0 Kudos
RokuMarkn
Visitor

Re: Unclear documentation regarding boolean as a return code

You're right, the exact meaning of the return value should be documented for each of the APIs. However in cases where this is lacking, true always means success and false means some kind of failure.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.