Roku Developer Program

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

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
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: Smiley Happy
0 Kudos
EnTerr
Level 8

Re: ifFunction.getName(), pls?

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

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