<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -176,7 +176,7 @@
 
 == sproutcore 0.9.12
 
-- SC.ButtonView &amp; SC.MenuItemView now removes and adds the 'active' class name
+- SC.ClassicButtonView &amp; SC.MenuItemView now removes and adds the 'active' class name
   on mouseExited and mouseEntered when the mouse is pressed to provide better 
   indication of whether an action will occur on mouse up. (Thanks schwa23)
 
@@ -592,10 +592,10 @@ group value is null.  Items will still be shown; they will just appear to be
 * Added new addClassName, removeClassName, setClassName and hasClassName
   methods on SC.ClassicView that are 7x faster than prototype's version.
 
-* Integrated SC.Control into SC.ButtonView
+* Integrated SC.Control into SC.ClassicButtonView
 
-* Changed SC.ButtonView.labelText and SC.ButtonView.labelSelector to 
-  SC.ButtonView.title and SC.ButtonView.titleSelector to be more consistant 
+* Changed SC.ClassicButtonView.labelText and SC.ClassicButtonView.labelSelector to 
+  SC.ClassicButtonView.title and SC.ClassicButtonView.titleSelector to be more consistant 
   with current naming conventions.
 
 * [FIX] Some doc tags were wrong in SC.ScrollView and others.</diff>
      <filename>HISTORY</filename>
    </modified>
    <modified>
      <diff>@@ -95,11 +95,11 @@ SC.runLoop = SC.Object.create({
     SC.Binding.flushPendingChanges() ;
 
     // Possibly go ahead and ask any changed views to re-render?
-    // --
+    SC.View.flushPendingQueues() ; 
     
     this._start = null ;
   },
-
+    
   /**
     The time the current run loop began executing.
     </diff>
      <filename>foundation/application/run_loop.js</filename>
    </modified>
    <modified>
      <diff>@@ -765,7 +765,7 @@ SC.Observable = {
         }
 
         // if there is a default property observer, call that also
-        if (this.propertyObserver) this.propertyObserver(null, this, key, null, rev);
+        if (this.propertyObserver) this.propertyObserver(this, key, null, rev);
       } // while(changes.length&gt;0)
 
       // changes set should be empty. save this set so it can be reused later</diff>
      <filename>foundation/mixins/observable.js</filename>
    </modified>
    <modified>
      <diff>@@ -7,25 +7,25 @@
   This is a generic builder.  You can use the create() or createFor() methods
   to actually create your own builder.
 
-  SC.Menu.builder = SC.builderFor(SC.Menu, {
+  SC.Menu.build = SC.builder({
     
   });
   
-  @param {Hash} props one or more hashes of properties
+  @param {Hash} helpers one or more hashes of helper properties
   @returns {Function} a builder function.
 */
-SC.builder = function(defaultClass, props) {
-  
-  // determine if default class was passed
-  var start = 1; 
-  if (SC.typeOf(defaultClass) !== SC.T_CLASS) {
-    defaultClass = null; start = 0 ;
-  }
+SC.builder = function(helpers) {
   
   // create the constructor for a new builder and copy on helpers
-  var construct = function(content, props) {
-    debugger ;
-    if (props === undefined &amp;&amp; SC.typeOf(content) === SC.T_HASH) {
+  var construct = function(defaultClass, content, props) {
+    
+    // save default class used for builder
+    if (!this.defaultClass) this.defaultClass = defaultClass ;
+    
+    // if first parameter after default class was an instance of the class,
+    // then set that as content.  Otherwise, create a new instance of the 
+    // class.
+    if (props === undefined &amp;&amp; (content instanceof this.defaultClass)) {
       props = content ; content = null ;
     }
     </diff>
      <filename>foundation/system/builder.js</filename>
    </modified>
    <modified>
      <diff>@@ -36,8 +36,51 @@ SC.CoreQuery = (function() {
   isSimple = /^.[^:#\[\.]*$/,
   undefined ;
 
+  // implement core methods here from jQuery that we want available all the
+  // time.  Use this area to implement jQuery-compatible methods ONLY.
+  // New methods should be added at the bottom of the file, where they will
+  // be installed as plugins on CoreQuery or jQuery. 
   CoreQuery.fn = CoreQuery.protoype = /** @scope SC.CoreQuery.prototype */ {
+
+    /** 
+      Take an array of elements and push it onto the stack (making it the
+      new matched set.)  The receiver will be saved so it can be popped later.
+    */
+    pushStack: function( elems ) {
+      // Build a new jQuery matched element set
+      var ret = CoreQuery(elems);
+
+      // Add the old object onto the stack (as a reference)
+      ret.prevObject = this;
+
+      // Return the newly-formed element set
+      return ret;
+    },
+    
     
+    /** 
+      Executes the passed function on every element in the CoreQuery object.
+      Returns an array with the return values.  Note that null values will
+      be omitted from the resulting set.  This differs from SC.Enumerable and
+      the JavaScript standard. 
+      
+      The callback must have the signature:
+      
+      {{{
+        function(currentElement, currentIndex) { return mappedValue; }
+      }}}
+      
+      Note that &quot;this&quot; on the function will also be the currentElement.
+      
+      @param {Function} callback
+      @returns {CoreQuery} results
+    */
+  	map: function( callback ) {
+  		return this.pushStack( CoreQuery.map(this, function(elem, i){
+  			return callback.call( elem, i, elem );
+  		}));
+  	}
+
   } ;
   
   // add useful helper methods to CoreQuery
@@ -45,7 +88,41 @@ SC.CoreQuery = (function() {
     
     nodeName: function( elem, name ) {
       return elem.nodeName &amp;&amp; elem.nodeName.toUpperCase() == name.toUpperCase();
-    }
+    },
+    
+    /**
+      Execute the passed callback on the elems array, returning an array with
+      the mapped values.  Note that null return values are left out of the
+      resulting mapping array.  This differs from the standard map() function
+      defined by SC.Enumerable and the JavaScript standard.
+      
+      The callback must have the signature:
+      
+      {{{
+        function(currentElement, currentIndex) { return mappedValue; }
+      }}}
+      
+      Note that &quot;this&quot; on the function will also be the currentElement.
+      
+      @param {Array} elems
+      @param {Function} callback
+      @returns {Array} mapped elements
+    */
+  	map: function( elems, callback ) {
+  		var ret = [];
+
+  		// Go through the array, translating each of the items to their
+  		// new value (or values).
+  		for ( var i = 0, length = elems.length; i &lt; length; i++ ) {
+  			var value = callback( elems[ i ], i );
+
+  			if ( value != null )
+  				ret[ ret.length ] = value;
+  		}
+  		
+  		return ret ;
+  	}
+    
         
   }) ;
   
@@ -54,3 +131,22 @@ SC.CoreQuery = (function() {
 
 // Install CoreQuery or jQuery, depending on what is available, as SC.$().
 SC.$ = (typeof jQuery == &quot;undefined&quot;) ? SC.CoreQuery : jQuery ;
+
+// Add some plugins to CoreQuery.  If jQuery is installed, it will get these
+// also.
+SC.mixin(SC.$.fn, /** @scope SC.CoreQuery.prototype */ {
+  
+  /** 
+    Attempts to find the views managing the passed DOM elements and returns
+    them.
+  */
+  view: function() {
+    return this.map(function() { 
+      var guid = this[SC.guidKey] ;
+      return (guid) ? SC.View.views[guid] : null ;  
+    });
+  }
+});
+
+
+</diff>
      <filename>foundation/system/core_query.js</filename>
    </modified>
    <modified>
      <diff>@@ -75,6 +75,8 @@ SC.mixin({
   /** @private handlers scheduled to execute on ready. */
   _readyQueue: [],
 
+  isReady: NO,
+  
   /** @private invoked when the document becomes ready. */
   _didBecomeReady: function() {
     // Only call once
@@ -102,7 +104,7 @@ SC.mixin({
     SC.runLoop.beginRunLoop();
     
     // If there are handlers scheduled, execute them.
-    var queue = this._readyQueue, idx = (queue) ? queue.length : 0 ;
+    var queue = SC._readyQueue, idx = (queue) ? queue.length : 0 ;
     while(--idx &gt;= 0) {
       var handler = queue[idx] ;
       var target = handler[0] || document ;
@@ -111,7 +113,7 @@ SC.mixin({
     }
     
     // clear the queue
-    this._readyQueue = null ;
+    SC._readyQueue = null ;
     
     // trigger any bound ready events
     SC.Event.trigger(&quot;ready&quot;, null, document, NO) ;</diff>
      <filename>foundation/system/ready.js</filename>
    </modified>
    <modified>
      <diff>@@ -91,7 +91,7 @@ view_helper :button_view do
     (x == :mixed) ? 'SC.MIXED_STATE' : x
   end
 
-  view 'SC.ButtonView'
+  view 'SC.ClassicButtonView'
 
   # HTML
   var :title</diff>
      <filename>lib/button_views.rb</filename>
    </modified>
    <modified>
      <diff>@@ -122,7 +122,7 @@ SC.OverlayPaneView = SC.PaneView.extend({
   // when you hit return from within a dialog or panel, look for a child 
   // view with isDefault =&gt; true
   insertNewline: function(sender, evt) {
-    var button = this._findViewWithKeyIn('isDefault', SC.ButtonView, this) ;
+    var button = this._findViewWithKeyIn('isDefault', SC.ClassicButtonView, this) ;
     if (button) {
       button.triggerAction(evt) ;
       return true ;
@@ -130,7 +130,7 @@ SC.OverlayPaneView = SC.PaneView.extend({
   },
   
   cancel: function(sender, evt) {
-    var button = this._findViewWithKeyIn('isCancel', SC.ButtonView, this) ;    
+    var button = this._findViewWithKeyIn('isCancel', SC.ClassicButtonView, this) ;    
     if (button) {
       button.triggerAction(evt) ;
       return true ;</diff>
      <filename>panes/overlay.js</filename>
    </modified>
    <modified>
      <diff>@@ -24,8 +24,8 @@ SC.TOGGLE_OFF_BEHAVIOR = &quot;off&quot; ;
   @version 1.0
   
 */
-SC.ButtonView = SC.ClassicView.extend(SC.Control,
-/** @scope SC.ButtonView.prototype */ {
+SC.ClassicButtonView = SC.ClassicView.extend(SC.Control,
+/** @scope SC.ClassicButtonView.prototype */ {
   
   emptyElement: '&lt;a href=&quot;javascript:;&quot; class=&quot;sc-button-view regular&quot;&gt;&lt;span class=&quot;button-inner&quot;&gt;&lt;span class=&quot;label&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;',
   </diff>
      <filename>views/button/button.js</filename>
    </modified>
    <modified>
      <diff>@@ -15,11 +15,11 @@ require('views/button/button');
   has other features not found in platform-native controls.  If you want to 
   use the platform native version instead, see SC.CheckboxFieldView.
 
-  @extends SC.ButtonView
+  @extends SC.ClassicButtonView
   @author    Charles Jolley 
   @version 1.0
 */
-SC.CheckboxView = SC.ButtonView.extend(
+SC.CheckboxView = SC.ClassicButtonView.extend(
 /** @scope SC.CheckboxView.prototype */ {
 
   emptyElement: '&lt;a href=&quot;javascript:;&quot; class=&quot;sc-checkbox-view sc-button-view button checkbox&quot;&gt;&lt;img src=&quot;%@&quot; class=&quot;button&quot; /&gt;&lt;span class=&quot;label&quot;&gt;&lt;/span&gt;&lt;/a&gt;'.fmt(static_url('blank')),</diff>
      <filename>views/button/checkbox.js</filename>
    </modified>
    <modified>
      <diff>@@ -8,11 +8,11 @@ require('views/button/button');
 
   Disclosure triangle button.
 
-  @extends SC.ButtonView
+  @extends SC.ClassicButtonView
   @author    Charles Jolley 
   @version 1.0
 */
-SC.DisclosureView = SC.ButtonView.extend(
+SC.DisclosureView = SC.ClassicButtonView.extend(
 /** @scope SC.DisclosureView.prototype */ {
 
   emptyElement: '&lt;a href=&quot;javascript:;&quot; class=&quot;sc-disclosure-view sc-button-view button disclosure&quot;&gt;&lt;img src=&quot;%@&quot; class=&quot;button&quot; /&gt;&lt;span class=&quot;label&quot;&gt;&lt;/span&gt;&lt;/a&gt;'.fmt(static_url('blank')),</diff>
      <filename>views/button/disclosure.js</filename>
    </modified>
    <modified>
      <diff>@@ -15,11 +15,11 @@ require('views/button/button');
   has other features not found in platform-native controls.  If you want to 
   use the platform native version instead, see SC.RadioFieldView.
 
-  @extends SC.ButtonView
+  @extends SC.ClassicButtonView
   @author    Charles Jolley 
   @version 1.0
 */
-SC.RadioView = SC.ButtonView.extend(
+SC.RadioView = SC.ClassicButtonView.extend(
 /** @scope SC.RadioView.prototype */ {
 
   emptyElement: '&lt;a href=&quot;javascript:;&quot; class=&quot;sc-radio-view sc-button-view button radio&quot;&gt;&lt;img src=&quot;%@&quot; class=&quot;button&quot; /&gt;&lt;span class=&quot;label&quot;&gt;&lt;/span&gt;&lt;/a&gt;'.fmt(static_url('blank')),</diff>
      <filename>views/button/radio.js</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ require('views/button/button') ;
 // A filter button sets a filter property to whatever you specifiy.  It 
 // also binds to the same property and updates its isSelected state based
 // on that.
-SC.FilterButtonView = SC.ButtonView.extend({
+SC.FilterButtonView = SC.ClassicButtonView.extend({
   
   filterValue: null, // relay to this property.
 </diff>
      <filename>views/filter_button.js</filename>
    </modified>
    <modified>
      <diff>@@ -285,11 +285,11 @@ SC.FormView = SC.ClassicView.extend({
     // if this field is a submitButton or resetButton and the actio is
     // not set, set it...
     var form = this ;
-    if (key == 'submitButton' &amp;&amp; (field.action == SC.ButtonView.prototype.action)) {
+    if (key == 'submitButton' &amp;&amp; (field.action == SC.ClassicButtonView.prototype.action)) {
       field.action = function() { form.commit(); } ;
     }
     
-    if (key ==&quot;resetButton&quot; &amp;&amp; (field.action == SC.ButtonView.prototype.action)) {
+    if (key ==&quot;resetButton&quot; &amp;&amp; (field.action == SC.ClassicButtonView.prototype.action)) {
       field.action = function() { form.reset(); } ;    
     }
     </diff>
      <filename>views/form.js</filename>
    </modified>
    <modified>
      <diff>@@ -11,10 +11,10 @@ require('views/classic_view') ;
   of button that will automatically close the popup menu when it is
   pressed.
   
-  @extends SC.ButtonView
+  @extends SC.ClassicButtonView
   
 */
-SC.MenuItemView = SC.ButtonView.extend({
+SC.MenuItemView = SC.ClassicButtonView.extend({
 
   emptyElement: [
   '&lt;li class=&quot;button menu-item&quot;&gt;',</diff>
      <filename>views/menu_item.js</filename>
    </modified>
    <modified>
      <diff>@@ -53,7 +53,7 @@ SC.PaginationView = SC.ClassicView.extend({
 
   outlets: ['prevButton','nextButton','pageButton'],
   
-  prevButton: SC.ButtonView.extend({
+  prevButton: SC.ClassicButtonView.extend({
     action: function() { this.owner.decrementProperty('currentPage'); },
     isEnabledBinding: &quot;*owner.hasPreviousPage&quot;
   })</diff>
      <filename>views/pagination.js</filename>
    </modified>
    <modified>
      <diff>@@ -3,15 +3,15 @@ require('views/button/button') ;
 /**
   @class
 
-  @extends SC.ButtonView
+  @extends SC.ClassicButtonView
   @author Skip Baney
   @copyright 2006-2008, Sprout Systems, Inc. and contributors.
   @version 1.0
 */
-SC.PopupButtonView = SC.ButtonView.extend({
+SC.PopupButtonView = SC.ClassicButtonView.extend({
 
   /**
-    Overriding the default SC.ButtonView#performKeyEquivalent method to pass 
+    Overriding the default SC.ClassicButtonView#performKeyEquivalent method to pass 
     it onto the menu
 
     @param {string} keystring method name corresponding to the keys pressed </diff>
      <filename>views/popup_button.js</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ SC.SegmentedView = SC.ClassicView.extend(
     this.segments.each(function(key) {
       var seg = view[key] ;
       var selectKey = key.slice(0,-6) ;
-      if (seg &amp;&amp; (seg.action == SC.ButtonView.prototype.action)) seg.action = function() {
+      if (seg &amp;&amp; (seg.action == SC.ClassicButtonView.prototype.action)) seg.action = function() {
         if (this.owner.get('allowsEmptySelection')) {
           newKey = (this.owner.get('value') == selectKey) ? null : selectKey;
         } else newKey = selectKey;</diff>
      <filename>views/segmented.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4fe66a877a13a4db3ed4cab099c3e265944ee015</id>
    </parent>
  </parents>
  <author>
    <name>Charles Jolley</name>
    <email>charles@sproutit.com</email>
  </author>
  <url>http://github.com/sproutit/sproutcore/commit/8e6f734db913c296828c97a596954401b19d9fa2</url>
  <id>8e6f734db913c296828c97a596954401b19d9fa2</id>
  <committed-date>2008-11-08T01:18:15-08:00</committed-date>
  <authored-date>2008-11-08T01:18:15-08:00</authored-date>
  <message>Rename uses of SC.View to SC.ClassicView</message>
  <tree>b38c093a8a1f5755b64e5b2495b3af00eef4c3e4</tree>
  <committer>
    <name>Charles Jolley</name>
    <email>charles@sproutit.com</email>
  </committer>
</commit>
