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: 
EnTerr
Roku Guru

ifFunction.getName(), pls?

@Roku* - can we please get a way to obtain function's name?

Something like .getName() - and concurrently (or alternatively) .toStr() to return a string with the name included. As in:
Brightscript Debugger> ? main
<Function: main>

Brightscript Debugger> ? main.toStr()
<Function: main>     'hypothetical, currently just says: Function '

Brightscript Debugger> ? main.getName()
main       'hypothetical

The specific use case is to be able to set function names in RSG fields, like Task.functionName. I know this is ass-backwards as it gets - but this is how RSG currently is - not supporting function type fields.

In addition, such retrospection would help with building test tools (being able to verify results). And in general i am thinking .toStr() should be defined for all data types to return a string that is as close to the PRINT output as possible.
0 Kudos
2 REPLIES 2
RokuKC
Roku Employee
Roku Employee

Re: ifFunction.getName(), pls?

"EnTerr" wrote:
@Roku* - can we please get a way to obtain function's name?

Something like .getName() - and concurrently (or alternatively) .toStr() to return a string with the name included.Brightscript Debugger> ?


I thought this had been discussed already, but at any rate, feature requested noted: 🙂
0 Kudos
EnTerr
Roku Guru

Re: ifFunction.getName(), pls?

"RokuKC" wrote:
I thought this had been discussed already, but at any rate, feature requested noted:  🙂

Thanks!
I was just reminded by this additional use case - RSG - for which the Co may care more.
My previous musings on introspection were regarding test suites, which is supplementary to prime business.
0 Kudos