1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 
  9 /**
 10   Patch SC.Object to respond to design
 11   
 12 */
 13 SC.Object.prototype.emitDesign = function() {
 14   
 15   // get design...
 16   var ret = SC.ObjectCoder.encode(this);
 17   
 18   return ret ;
 19 };
 20 
 21 
 22 /** 
 23   Patch `SC.Object` to respond to `encodeDesign()`.  This will proxy to the
 24   paired designer, if there is one.  If there is no paired designer, returns
 25   `NO`.
 26 */
 27 SC.Object.prototype.encodeDesign = function(coder) {
 28   return this.designer ? this.designer.encodeDesign(coder) : NO ;
 29 };
 30