Skip to content

Commit

Permalink
- returned to setRawValueTo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickolay Platonov committed Oct 8, 2010
1 parent 1b52e07 commit 53a557e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions lib/KiokuJS/Feature/Attribute/Lazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Role('KiokuJS.Feature.Attribute.Lazy', {

scope.lookUp(ID).andThen(function (obj) {

me.setValueTo(self, obj)
me.setRawValueTo(self, obj)

this.CONT.CONTINUE(obj)
}, self)
Expand All @@ -54,12 +54,6 @@ Role('KiokuJS.Feature.Attribute.Lazy', {
this.CONT.CONTINUE(value)
}, self)
}
},


// XXX somewhat hackish.. seems we still need `getRawValue`
getValueFrom : function (instance) {
return instance[ this.slot ]
}
}
})
2 changes: 1 addition & 1 deletion lib/KiokuJS/Test/TypeMap/Person.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Class('KiokuJS.Test.TypeMap.Person', {
//
// Joose.O.each(instance.meta.getAttributes(), function (attribute, name) {
//
// data[ name ] = collapser.visit(attribute.getValueFrom(instance))
// data[ name ] = collapser.visit(attribute.getRawValueFrom(instance))
// })
//
// return data
Expand Down
4 changes: 2 additions & 2 deletions lib/KiokuJS/TypeMap/Joose.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Class('KiokuJS.TypeMap.Joose', {

if (attribute.hasValue(instance))
if (attributeLevel) {
data[ name ] = collapser.visit(attribute.getValueFrom(instance))
data[ name ] = collapser.visit(attribute.getRawValueFrom(instance))

if (attributeLevel == 2 && attribute.meta.does(KiokuJS.Aspect.AfterCollapse)) attribute.afterCollapse(instance, data[ name ], node, collapser, attribute)

Expand Down Expand Up @@ -148,7 +148,7 @@ Class('KiokuJS.TypeMap.Joose', {

if (data.hasOwnProperty(name))
if (attributeLevel)
attribute.setValueTo(instance, expander.visit(data[ name ]))
attribute.setRawValueTo(instance, expander.visit(data[ name ]))
else
// Joose.Proto.Class attributes - just raw values
instance[ attribute.name ] = expander.visit(data[ name ])
Expand Down

0 comments on commit 53a557e

Please sign in to comment.