Skip to content

Instantly share code, notes, and snippets.

OnTap.TestCustomView = SC.View.extend({
mouseDragged: function(evt) {
console.log("Dragged!");
return YES;
}
});
hexValueChanged:function(){
console.log("Value Changed");
console.log(this.getPath("NumberConverter.mainPage.textValue"));
}.observes("NumberConverter.mainPage.textValue")
DarkHorse.Inbox = SC.View.extend(
/** @scope DarkHorse.Inbox.prototype */ {
childViews: "inboxSplitView".w(),
//
inboxSplitView: SC.SplitView.design({
layout: { top: 0, right: 0, bottom: 0, left: 0 },
defaultThickness: 0.25,
layoutDirection: SC.LAYOUT_HORIZONTAL,
MyApp.MyObject = SC.Object.extend({
property: value;
computedProperty: function(){
return value === "foo";
}.observes('value').property(),
setProperty: function(value){
this.set('value',value);
MyApp.MyView = SC.View.extend({
init:function(){
sc_super();
this.someInitFunction();
},
someInitFunction: function(){
// can I call this?
}
});
if (active) {
if (this._currentDirection !== null) {
active.set("buildDirection", this._currentDirection);
this.buildOutChild(active);
} else {
this.removeChild(active);
}
}
if (replacement) {
if (this._currentDirection !== null) {
topToolbarDidChange: function() {
var active = this.activeTopToolbar, replacement = this.get("topToolbar");
// if we have an active toolbar, set the build direction and build out
if (active) {
if (this._currentDirection !== null) {
active.set("buildDirection", this._currentDirection);
this.buildOutChild(active);
} else {
this.removeChild(active);
contentView: SC.TabView.design({
layout: {
top: 10,
right: 10,
bottom: 10,
left: 10
},
items: [
{ title: 'News', value: 'news' },
{ title: 'Assignments', value: 'DarkHorse.CourseView.AssignmentsView' },
// ==========================================================================
// Project: DarkHorse.CourseView
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals DarkHorse SCUI*/
/** @class
(Document Your View Here)
contentView: SC.TabView.design({
layout: {
top: 10,
right: 10,
bottom: 10,
left: 10
},
items: [
{ title: 'News', value: '.parentView.NewsView' },
{ title: 'Assignments', value: 'DarkHorse.AssignmentsSubView' },