Subversion Repositories pub

Compare Revisions

Ignore whitespace Rev 56 → Rev 62

/pluggablejs/trunk/samples/langext.js
0,0 → 1,31
 
println("Language extensions samples");
 
println("|> Inclusion of langext-included.js, composition of ");
println("|> an object from different files");
 
function method1_implementation() {
println("This method is defined in langext.js");
}
 
var method2_implementation = null;
 
// If method2 was defined this way it will fail, it needs to be
// defined as with method3
var obj = {
method1: method1_implementation,
method2: method2_implementation,
method3: function() {
method3_implementation();
}
};
 
lang.include("langext-included.js");
 
// ... instead, it can be defined now though
obj.method2 = method2_implementation;
 
println("|> calling of methods defined elsewhere:");
obj.method1();
obj.method2();
obj.method3();
/pluggablejs/trunk/samples/interactive-call.js
0,0 → 1,2
 
net.outlyer.plugins.Shell.interactive($net.outlyer.runtime.pluginEnvironment);
/pluggablejs/trunk/samples/langext-included.js
0,0 → 1,9
 
println("|< langext-included.js loaded");
 
method2_implementation = function() {
println("This method is defined in langext-included.js");
}
 
method3_implementation = method2_implementation;