Sha256: f6dc3fed6a006579a15f35ac3a4abf3007801b3bccc0e7219c680d90a3a9f9e4

Contents?: true

Size: 1.63 KB

Versions: 17

Compression:

Stored size: 1.63 KB

Contents

// ==========================================================================
// Project:   SproutCore Costello - Property Observing Library
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2009 Apple Inc. All rights reserved.
// License:   Licened under MIT license (see license.js)
// ==========================================================================

/**
  The SC.ObservableProtocol defines optional methods you can implement on your
  objects.  They will be used if defined but are not required for observing to
  work.
*/
SC.ObservableProtocol = {
  
  /**  
    Generic property observer called whenever a property on the receiver 
    changes.
    
    If you need to observe a large number of properties on your object, it
    is sometimes more efficient to implement this observer only and then to
    handle requests yourself.  Although this observer will be triggered 
    more often than an observer registered on a specific property, it also
    does not need to be registered which can make it faster to setup your 
    object instance.
    
    You will often implement this observer using a switch statement on the
    key parameter, taking appropriate action. 
    
    @param observer {null} no longer used; usually null
    @param target {Object} the target of the change.  usually this
    @param key {String} the name of the property that changed
    @param value {Object} the new value of the property.
    @param revision {Number} a revision you can use to quickly detect changes.
    @returns {void}
  */
  propertyObserver: function(observer,target,key,value, revision) {
    
  }
  
};

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.20090721145285 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1046 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1043 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1042 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1037 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1035 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1031 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1030 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1029 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1027 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1028 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1026 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1025 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1024 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1009 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1008 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js
sproutcore-1.0.1003 frameworks/sproutcore/frameworks/runtime/protocols/observable_protocol.js