Created
August 19, 2008 18:05
-
-
Save erichocean/6211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readAttribute: function(key) { | |
if (!this._cachedAttributes) this._cachedAttributes = {} ; | |
var ret = this._cachedAttributes[key] ; | |
if (ret === undefined) { | |
var attr = this._attributes ; | |
ret = (attr) ? attr[key] : undefined ; | |
if (ret !== undefined) { | |
var recordType = this._getRecordType(key+'Type') ; | |
ret = this._propertyFromAttribute(ret, recordType) ; | |
} | |
this._cachedAttributes[key] = ret ; | |
} | |
return (ret === undefined) ? null : ret; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment