Developers

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.
Tags (1)
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: 🙂
Tags (1)
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.
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!