From 557473639c1854d2e545f542d5f8656a040d575c Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 6 Jun 2012 14:42:12 -0700 Subject: Object Controller Signed-off-by: Armen Kesablyan --- js/controllers/objects-controller.js | 24 ++++++++++++++---------- js/stage/binding-view.reel/binding-view.js | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 32f24d5c..6da53b0f 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js @@ -94,15 +94,15 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { if(descriptors.hasOwnProperty(property)) { descriptor = descriptors[property]; - bindingArgsObject = { - sourceObject : object, - sourceObjectPropertyPath : property, - boundObject : descriptor.boundObject, - boundObjectPropertyPath : descriptor.boundObjectPropertyPath, - oneway : descriptor.oneway - }; - - bindingsArray.push(bindingArgsObject); + bindingArgsObject = { + sourceObject : object, + sourceObjectPropertyPath : property, + boundObject : descriptor.boundObject, + boundObjectPropertyPath : descriptor.boundObjectPropertyPath, + oneway : descriptor.oneway + }; + + bindingsArray.push(bindingArgsObject); } } } @@ -125,6 +125,7 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { } return prototypes.map(function(proto) { + var metadata = proto._montage_metadata, objectName = (metadata) ? metadata.objectName : "Object"; @@ -142,8 +143,11 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { var properties = []; for(var key in object) { + debugger; if(object.hasOwnProperty(key)) { - properties.push(key); + if(key.serializable) { + properties.push(key); + } } } diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js index 8ffc45c1..d76aab81 100755 --- a/js/stage/binding-view.reel/binding-view.js +++ b/js/stage/binding-view.reel/binding-view.js @@ -46,6 +46,7 @@ exports.BindingView = Montage.create(Component, { this._selectedComponent = val; this.application.ninja.objectsController.currentObject = this.selectedComponent; var arrBindings = this.application.ninja.objectsController.currentObjectBindings; + debugger; arrBindings.forEach(function(obj) { }.bind(this)); -- cgit v1.2.3