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
var row = Ti.UI.createTableViewRow({ | |
height:'auto', | |
hasChild : true, | |
backgroundColor: 'black' | |
// backgroundGradient: { | |
// type: 'linear', | |
// colors: ['#000001','#666666'], | |
// backFillStart: false | |
// } | |
}); |
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
D/KrollEventManager( 1222): (main) [1,23051] Added for eventName 'click' with id 1 | |
E/TiAnalyticsSvc( 1222): (Thread-10) [384,23435] Error posting events: Host is unresolved: api.appcelerator.net:443 | |
E/TiAnalyticsSvc( 1222): java.net.UnknownHostException: Host is unresolved: api.appcelerator.net:443 | |
E/TiAnalyticsSvc( 1222): at java.net.Socket.connect(Socket.java:1037) | |
E/TiAnalyticsSvc( 1222): at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:317) | |
E/TiAnalyticsSvc( 1222): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129) | |
E/TiAnalyticsSvc( 1222): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) |
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
App.MyView = SC.View.extend(SC.ContentDisplay, { | |
displayProperties: ['p1'], | |
contentDisplayProperties: ['c1', 'c2'], | |
p1: null, // If you call this.set('p1', something), the view will rerender | |
// if content, or c1 or c2 on content change, the view rerenders | |
contentBinding: SC.Binding.oneWay('App.controller.content') |
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
function main() { | |
var ui = Sudoku.null, | |
widget = Sudoku.widget; | |
// SC.View initially has no layers, so you'll add your widget to your | |
// view's layers so it can display itself and receive events. | |
ui.get('layers').pushObject(widget); | |
// Next, you'll tell `SC.app` that you want your `SC.View` surface to | |
// become the app's user interface ('ui'). Each app has only one active |
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
updateDisplay: function() { | |
if (!this.getPath('subsurfaces.length')) this._createSubsurfaces(); | |
console.log('board update display'); | |
// console.log('SC.ContainerSurface#updateDisplay()'); | |
var subsurfaces = this.get('subsurfaces'); | |
if (subsurfaces) subsurfaces.invoke('updateDisplay'); | |
}, |
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
/** | |
* An individual cell's surface | |
* @author Michael Harris | |
*/ | |
Sudoku.CellSurface = SC.View.extend({ | |
updateDisplay: function() { | |
console.log('cell update display '); | |
var psurface = SC.psurfaces[this.__id__], | |
canvas = psurface ? psurface.__element__ : null, |
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
/** | |
* An individual cell's surface | |
* @author Michael Harris | |
*/ | |
Sudoku.CellSurface = SC.View.extend({ | |
init: function(){ | |
sc_super(); | |
var layers = this.get('layers'), | |
frame = this.get('frame'), |
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
sc_require('sudoku/views/cell'); | |
Sudoku.BoardSurface = SC.CompositeSurface.extend({ | |
backgroundColor: "#268bd2", | |
contentBinding: SC.Binding.oneWay('Sudoku.cellsController.arrangedObjects'), | |
contentDidChange: function(){ | |
console.log('cells changed, triggering rendering'); | |
this.triggerRendering(); | |
}.observes('content'), |
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
Sudoku.CellSurface = SC.View.extend(SC.ContentDisplay, { | |
contentDisplayProperties: ['value'], | |
content: null, | |
init: function() { | |
sc_super(); | |
var layers = this.get('layers'); | |
this._valueLayer = Sudoku.ValueLayer.create({ | |
layout: {top: 0, left: 0, right: 0, bottom: 0} |
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
sc_require('sudoku/views/cell'); | |
Sudoku.BoardSurface = SC.CompositeSurface.extend({ | |
backgroundColor: "#268bd2", | |
contentBinding: SC.Binding.oneWay('Sudoku.cellsController.content'), | |
numberOfRows: 9, | |
numberOfColumns: 9, | |
currentSelection: -1, | |
contentDidChange: function() { |