Thursday, June 3, 2010

Hiding Helper Functions

In contrast to Tuesday's extended post, here's a quick tip for hiding 'helper' function:
Add an underscore "_" to the end of a function name to make it private - e.g. foo_().
There are just two side effects:
  1. The function won't show up in the editor's run drop down box.
  2. The function won't show up in the spreadsheet script manager.
The function can still be called inside the script, and it can still be invoked in a spreadsheet cell.

No comments:

Post a Comment