-
-
Save brianjmiller/995783 to your computer and use it in GitHub Desktop.
This file contains 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
Y.namespace('tnsg5').Tile = Y.Base.create("tile", Y.Widget,[], { | |
initializer: function () { | |
this.dataSource = this.getDataSourceInstance(); | |
var dsCfg = { | |
request: "cb={}", | |
callback: { | |
//HERE IS WHERE THE FUNCTION IS ADDED | |
success: Y.bind(this.onSuccessfulLoad, this) | |
} | |
} | |
this.dataSource.sendRequest(dsCfg); | |
}, | |
onSuccessfulLoad: function (e) { | |
var that = this; | |
//ERROR! How do I get this to refer to the class instance? | |
that.tileNode.one('.tileTitle').set('text', e.data.title); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment