summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/plugin.js
blob: 900856b066edaa197042d2803347861da72ecc87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

var plugins = Factory.listBindingPlugins();
println("Currently Usable Plugins:");
for ( var idx = 0; idx < plugins.length; ++idx)
	println(plugins[idx]);

try {
var invalid1 = new NotReallyThere(this);
}
catch(ex) {
println('Exception: '+ex);
}

var foo1 = new MyCustomObject(this);
var foo2 = new MyCustomObject(this);

foo1.setThing("Test");

println( foo1.On );
println( foo1.Off );

foo2.setMode(foo2.On);
foo2.setThing(foo2.thing());

if( foo2.mode() == foo1.On )
{
	var foo3 = foo2;
	println("Foo3 thing " + foo3.thing());
	
}

var foo4 = new MyCustomTQObject(this);

foo4.mode = foo4.On;
foo4.thing = "Test";

if( foo4.mode )
{
	println( foo4.thing );
}