author | dadubrow |
Mon, 06 Apr 2009 13:50:37 -0500 | |
branch | RCL_2_0 |
changeset 48 | cfd7fcf6bf2d |
parent 2 | d760517a8095 |
permissions | -rw-r--r-- |
2 | 1 |
var gCounter = 0; |
2 |
||
3 |
function FooBar() { |
|
4 |
this.counter = ++gCounter; |
|
5 |
} |
|
6 |
||
7 |
FooBar.prototype.doFoo = function() { |
|
8 |
||
9 |
return this.counter; |
|
10 |
} |
|
11 |
||
12 |
FooBar.prototype.doBar = function() { |
|
13 |
||
14 |
return this.counter; |
|
15 |
} |
|
16 |
||
17 |
FooBar.prototype.propertyChanged = function(instance, propertyId) { |
|
18 |
if (propertyId == "foo") |
|
19 |
instance.properties.bar = instance.properties.foo; |
|
20 |
} |