Created
September 26, 2010 20:05
-
-
Save hvgotcodes/598275 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
createChildViews : function() { | |
var childViews = [], view; | |
var given = this.getPath('content.given'); | |
this.inputView = view = this.createChildView(SC.LabelView, { | |
valueBinding: '*content.value', | |
isEditable: given ? NO : YES, | |
click: function(evt) { | |
return this.touchStart(evt); | |
}, | |
touchStart: function(evt) { | |
return this.beginEditing(); | |
}, | |
inlineEditorDidEndEditing: function(inlineEditor, finalValue) { | |
sc_super(); | |
this.getPath('parentView').toggle(); | |
} | |
// validator: SC.Validator.PositiveInteger | |
}); | |
view.bind('content', this, 'content'); | |
childViews.push(view); | |
var hints = [SC.Object.create(...stuff here),]; | |
this.setPath('content.hints', hints); | |
this.hintView = view = this.createChildView(App.AvailableView, { | |
layout: {top: 0, left: 0, right: 0, bottom: 0}, | |
backgroundColor: 'green', | |
content: this.get('content'), | |
hints: this.getPath('content.hints') | |
// contentBinding: SC.Binding.from('content', this), | |
// hintsBinding: SC.Binding.from('content.hints', this) | |
}); | |
// view.bind('content', this, 'content'); | |
childViews.push(view); | |
// | |
this.toggle(); | |
this.set('childViews', childViews); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment