new Code()
MEMBERS
-
includeEnd___MyConditionalCodeTag :object
-
Conditional code closer. Use this tag at the end of a section of code that will only be included when the associated conditional code tag is enabled in the given configuration.
Example:
console.log('this is always happening'); this.includeIf___MyConditionalCodeTag; console.log('this is only happening when the MyConditionalCodeTag tag is included in the conditionalCodeTagsIncluded array for the current configuration.'); this.includeEnd___MyConditionalCodeTag;
-
includeEnd___published :object
-
Conditional code closer. Use this tag at the end of a section of code that will only be included when the project is published.
Example:
console.log('this is always happening'); CODE.includeIf___published; console.log('this is only happening when the project is published'); CODE.includeEnd___published;
-
includeEnd___unpublished :object
-
Conditional code closer. Use this tag at the end of a section of code that will only be included when the project is not published.
Example:
console.log('this is always happening'); CODE.includeIf___unpublished; console.log('this is only happening when the project is not published'); CODE.includeEnd___unpublished;
-
includeIf___MyConditionalCodeTag :object
-
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the associated conditional code tag is enabled in the given configuration.
Example:
console.log('this is always happening'); this.includeIf___MyConditionalCodeTag; console.log('this is only happening when the MyConditionalCodeTag tag is included in the conditionalCodeTagsIncluded array for the current configuration.'); this.includeEnd___MyConditionalCodeTag;
-
includeIf___published :object
-
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the project is published.
-
includeIf___unpublished :object
-
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the project is not published.
Example:
console.log('this is always happening'); CODE.includeIf___unpublished; console.log('this is only happening when the project is not published'); CODE.includeEnd___unpublished;
-
preserve___begin :object
-
Preservation opener. Use this tag at the beginning of a block of code to exempt it from all forms of code formatting including minification, whitespace removal, and comment removal.
-
preserve___end :object
-
Preservation closer. Use this tag at the end of a block of code to exempt it from all forms of code formatting including minification, whitespace removal, and comment removal.
-
runBeforeInit___begin :object
-
A code tag that denotes the beginning of a 'runBeforeInit' block. Generally, code written within Incisor® is completely object-oriented, and as such all code execution must originate from within class objects. In other words, if you open up a new javascript file, and type "nc.addGraphicObject();", you would get an error pointing out that 'nc' doesn't exist, since that code is running in a class-declaration scope. To get that code to execute properly, you would either need to included in a class function that is ultimately called as a result of the ProjectMain.init function, OR you can include that code in a 'runBeforeInit' block, which actually moves the code so that it will be executed right before the invokation of ProjectMain.init. It should be noted that 'runBeforeInit' blocks also exist for code assets, as well as Incisor® extensions, and have a similar effect - moving blocks of code to the same scope as the entry-points for those contexts.
Example:
CODE.runBeforeInit___begin; // since this code is inside of a 'runBeforeInit' block, it will be run right before ProjectMain.init, and all standard classes will have access to the 'whiteBox' var. var whiteBox = nc.addGraphicObject(); CODE.runBeforeInit___end;
-
runBeforeInit___end :object
-
A code tag that denotes the end of a 'runBeforeInit' block. Generally, code written within Incisor® is completely object-oriented, and as such all code execution must originate from within class objects. In other words, if you open up a new javascript file, and type "nc.addGraphicObject();", you would get an error pointing out that 'nc' doesn't exist, since that code is running in a class-declaration scope. To get that code to execute properly, you would either need to included in a class function that is ultimately called as a result of the ProjectMain.init function, OR you can include that code in a 'runBeforeInit' block, which actually moves the code so that it will be executed right before the invokation of ProjectMain.init. It should be noted that 'runBeforeInit' blocks also exist for code assets, as well as Incisor® extensions, and have a similar effect - moving blocks of code to the same scope as the entry-points for those contexts.
Example:
CODE.runBeforeInit___begin; // since this code is inside of a 'runBeforeInit' block, it will be run right before ProjectMain.init, and all standard classes will have access to the 'whiteBox' var. var whiteBox = nc.addGraphicObject(); CODE.runBeforeInit___end;
METHODS
-
includeFile()
-
Function that inserts Javascript code from another file at the location of the function call.