Cleaning up. No more bubbling events. All tests run fine. Following the Object.observe pattern (untested).

This commit is contained in:
DadaMonad
2014-12-17 22:50:08 +00:00
parent 584964153c
commit 21f7350c4d
35 changed files with 263 additions and 387 deletions

View File

@@ -73,11 +73,12 @@ describe "JsonFramework", ->
console.log "" # TODO
@yTest.run()
it "has a change listener", ()->
### TODO
it "has a update listener", ()->
addName = false
change = false
change2 = 0
@test_user.on 'addProperty', (eventname, property_name)->
@test_user.on 'add', (eventname, property_name)->
if property_name is 'x'
addName = true
@test_user.val('x',5)
@@ -86,7 +87,7 @@ describe "JsonFramework", ->
change = true
@test_user.val('x', 6)
@test_user.val('ins', "text", 'mutable')
@test_user.on 'change', (eventname, property_name)->
@test_user.on 'update', (eventname, property_name)->
if property_name is 'ins'
change2++
@test_user.val('ins').insertText 4, " yay"
@@ -94,6 +95,7 @@ describe "JsonFramework", ->
expect(addName).to.be.ok
expect(change).to.be.ok
expect(change2).to.equal 8
###
it "has a JsonTypeWrapper", ->
y = this.yTest.getSomeUser().getSharedObject()