<commit_before>// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

require("sproutcore-views/system/event_dispatcher");

var get = SC.get, set = SC.set;

/**
  @class

  An SC.Application instance serves as the namespace in which you define your
  application's classes. You can also override the configuration of your
  application.

  By default, SC.Application will begin listening for events on the document.
  If your application is embedded inside a page, instead of controlling the
  entire document, you can specify which DOM element to attach to by setting
  the `rootElement` property:

      MyApp = SC.Application.create({
        rootElement: $('#my-app')
      });

  The root of an SC.Application must not be removed during the course of the
  page's lifetime. If you have only a single conceptual application for the
  entire page, and are not embedding any third-party SproutCore applications
  in your page, use the default document root for your application.

  You only need to specify the root if your page contains multiple instances 
  of SC.Application.

  @since SproutCore 2.0
  @extends SC.Object
*/
SC.Application = SC.Namespace.extend(
/** @scope SC.Application.prototype */{

  /**
    @type DOMElement
    @default document
  */
  rootElement: document,

  /**
    @type SC.EventDispatcher
    @default null
  */
  eventDispatcher: null,

  /**
    @type Object
    @default null
  */
  customEvents: null,

  /** @private */
  init: function() {
    var eventDispatcher,
        rootElement = get(this, 'rootElement');

    eventDispatcher = SC.EventDispatcher.create({
      rootElement: rootElement
    });

    set(this, 'eventDispatcher', eventDispatcher);

    var self = this;
    SC.$(document).ready(function() {
      self.ready();
    });
  },

  ready: function() {
    var eventDispatcher = get(this, 'eventDispatcher'),
        customEvents    = get(this, 'customEvents');

    eventDispatcher.setup(customEvents);
  },

  /** @private */
  destroy: function() {
    get(this, 'eventDispatcher').destroy();
    return this._super();
  }
});


<commit_msg>Call _super() from SC.Application so it is registered in the SC.Namespace registry.<commit_after>// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

require("sproutcore-views/system/event_dispatcher");

var get = SC.get, set = SC.set;

/**
  @class

  An SC.Application instance serves as the namespace in which you define your
  application's classes. You can also override the configuration of your
  application.

  By default, SC.Application will begin listening for events on the document.
  If your application is embedded inside a page, instead of controlling the
  entire document, you can specify which DOM element to attach to by setting
  the `rootElement` property:

      MyApp = SC.Application.create({
        rootElement: $('#my-app')
      });

  The root of an SC.Application must not be removed during the course of the
  page's lifetime. If you have only a single conceptual application for the
  entire page, and are not embedding any third-party SproutCore applications
  in your page, use the default document root for your application.

  You only need to specify the root if your page contains multiple instances 
  of SC.Application.

  @since SproutCore 2.0
  @extends SC.Object
*/
SC.Application = SC.Namespace.extend(
/** @scope SC.Application.prototype */{

  /**
    @type DOMElement
    @default document
  */
  rootElement: document,

  /**
    @type SC.EventDispatcher
    @default null
  */
  eventDispatcher: null,

  /**
    @type Object
    @default null
  */
  customEvents: null,

  /** @private */
  init: function() {
    var eventDispatcher,
        rootElement = get(this, 'rootElement');

    eventDispatcher = SC.EventDispatcher.create({
      rootElement: rootElement
    });

    set(this, 'eventDispatcher', eventDispatcher);

    var self = this;
    SC.$(document).ready(function() {
      self.ready();
    });

    this._super();
  },

  ready: function() {
    var eventDispatcher = get(this, 'eventDispatcher'),
        customEvents    = get(this, 'customEvents');

    eventDispatcher.setup(customEvents);
  },

  /** @private */
  destroy: function() {
    get(this, 'eventDispatcher').destroy();
    return this._super();
  }
});



{'fraction_non_alphanumeric': 0.1568903173965448, 'fraction_numerical': 0.007231820008035355, 'mean_word_length': 3.375219683655536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '410136', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1258, 'n_words': 462}