Forum Discussion
AlexKaras
Champion Level 3
Hi,
> I don't understand; [...]
No. I meant that the whole body of the internal function must be provided inline.
I.e. you must write
function InformationGrid() { this.Grid = parentElement.FindChild("className", "info_container", 3); this.GetDogName = function(rowIndex) { Log.Message(name); } }
but cannot write like this (pseudocode):
function InformationGrid() { this.Grid = parentElement.FindChild("className", "info_container", 3); this.GetDogName = function(rowIndex) { //USEUNIT GetDogName.js; // <== a kind of include } }
For the non-trivial internal functions, combined with absent navigation/intellisense for internal functions (and absense of something like header files in C\C++ (.h files)), the result of this will be that you will have to continuously scroll up and down through the file in order to locate the function that you need.
Yes, in runtime everything works as expected, but it was exactly because of debug/navigation inconveniences we stopped using internal functions in our project.
jmarkman
6 years agoOccasional Contributor
Ah, I see. Thanks for clarifying, I appreciate it.
Related Content
Recent Discussions
- 3 hours agoSvetaG