Skip to content

Instantly share code, notes, and snippets.

View MikailCliftov's full-sized avatar

MikailCliftov

View GitHub Profile
@MikailCliftov
MikailCliftov / yui uild error
Created February 17, 2011 18:58
yui build error
INFO ~ Building entries for /sproutcore:en...
INFO ~ stylesheet.css -> tmp/build/static/sproutcore/en/fd023b819af08483bbc471
14fc5388626b7a390c/stylesheet.css
INFO ~ javascript.js -> tmp/build/static/sproutcore/en/fd023b819af08483bbc4711
4fc5388626b7a390c/javascript.js
INFO ~ javascript-packed.js -> tmp/build/static/sproutcore/en/fd023b819af08483
bbc47114fc5388626b7a390c/javascript-packed.js
INFO ~ stylesheet-packed.css -> tmp/build/static/sproutcore/en/fd023b819af0848
3bbc47114fc5388626b7a390c/stylesheet-packed.css
FATAL ~ Invalid argument - ./tmp/chance/c:
Rapid.checkDataDefinitionController = SC.ObjectController.create(
SC.CollectionViewDelegate,{
nestedStore: null,
checkStore: function(){
if (this.get('nestedStore')){
//nestedStore is not null
}else{
this.nestedStore = Rapid.store.chain();
//this.set('nestedStore', nestedStore);
}
Custom View: This works
Todos.ScrollingList = SC.View.extend(
/** @scope Todos.ScrollingList.prototype */ {
render: function(context){
var template = SC.TEMPLATES['todos']();
mainView : SC.TabView.design({
layout : {
top : 36,
left : 40,
right : 40,
bottom : 40
},
nowShowing : 'stepsView',
itemTitleKey : 'title',
itemValueKey : 'value',
SC.TableColumn.create({
key: 'phoneType',
label: 'Type',
exampleView: SC.SelectView,
itemsBinding: 'MyApp.telephonetypesController.arrangedObjects',
valueBinding: 'phoneType',
itemTitleKey: 'displayName'
})
The example view displays but is unpopulated.. I think its because the exampleView points to a class and not an object. Is there a way to make the SelectView show up right?
//at a console in firefox: should I see an alert with value 'hi' from the following:
q = Rapid.store.find(MyApp.A);
q.forEach(function(item){
v = MyApp.store.materializeRecord(item.get('storeKey'));
console.log(v);
})
//inside of A SC.Record
aComputedProperty : function(){
This works as an ArrayController:
Rapid.workflowCurrentApplicationController = SC.ArrayController.create({
contentBinding: SC.Binding.single('Rapid.workflowApplicationsController.selection'),
userBinding: SC.Binding.oneWay().from('Rapid.rootWorkflowController.content'),
observeMe: function(){
console.log('c '+this.get('content'));
console.log('u: '+ this.get('user'));
}.observes('content', 'user')
});
output
MyApp.SettingsListItemView = SC.View.extend(SC.ContentDisplay,{
layout: {top:0, left:0, width:200, height: 32},
contentDisplayProperties: 'settings somethingElse'.w(),
render: function(context, firstTime){
var content = this.get('content'), view;
var settings = content.get('settings');
var somethingElse = content.get('somethingElse');
view = this.createChildView(SC.LabelView.design({
//layout however you want
value: settings
Rapid.isBusyController = SC.ArrayController.create({
isBusy: NO,
manageBusyState: function(item){
this.set('isBusy', YES);
if (item && (status = item.get('status'))){
while ((status = item.get('status')) & SC.Record.BUSY){
SC.RunLoop.begin(); //<---no affect
SC.RunLoop.end(); //<--- i guess the jobs in here affect teh status
}
var result = Rapid.store.find(q);
result.addObserver('status', Rapid.workflowChecksController, 'checkTypeQueryReturn');
the observer function fires only once with a value for status of null.... what am I doing wrong?