
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 10:28 PM
I want "a set of scripts" in script include into a group, such as I want to have a global.cars.script1 and global.cars.script2. Similar I want to have global.trucks.script1 and global.trucks.script2 as an API name (Please forgive my bad example but you get an idea).
Is there a way to do this? I want to have the API Names clean so If I am looking into a set of scripts I know where to go and when I want to call them instead of all of them under 'global' with different names?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 07:25 PM
AFAIK, it's not supported.
It's possible to define a function within the Script Include function or initialize another class within a function but this will be different.
var NestedFunctionTest = Class.create();
NestedFunctionTest.prototype = {
initialize: function() {},
parentFunction: function(name) {
var temp = 'parent function';
if (name == 'childFunction')
return childFunction();
function childFunction() {
return 'child';
}
return temp;
},
type: 'NestedFunctionTest'
};

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 10:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 06:44 PM
Hey

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 07:25 PM
AFAIK, it's not supported.
It's possible to define a function within the Script Include function or initialize another class within a function but this will be different.
var NestedFunctionTest = Class.create();
NestedFunctionTest.prototype = {
initialize: function() {},
parentFunction: function(name) {
var temp = 'parent function';
if (name == 'childFunction')
return childFunction();
function childFunction() {
return 'child';
}
return temp;
},
type: 'NestedFunctionTest'
};

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 06:44 PM
Hey