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 + node_modules/montage/ui/native-control.js | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) 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)); diff --git a/node_modules/montage/ui/native-control.js b/node_modules/montage/ui/native-control.js index 8dad5408..d2c7f8b1 100644 --- a/node_modules/montage/ui/native-control.js +++ b/node_modules/montage/ui/native-control.js @@ -96,7 +96,7 @@ var NativeControl = exports.NativeControl = Montage.create(Component, /** @lends var newDescriptor = { configurable: (typeof descriptor.configurable == 'undefined') ? true: descriptor.configurable, enumerable: (typeof descriptor.enumerable == 'undefined') ? true: descriptor.enumerable, - serializable: (typeof descriptor.serializable == 'undefined') ? true: descriptor.serializable, + set: (function(name, attrName) { return function(value) { var desc = this._getElementAttributeDescriptor(name, this); -- cgit v1.2.3