dist/ember-runtime.js in ember-source-1.0.0.rc1.0.0 vs dist/ember-runtime.js in ember-source-1.0.0.rc1.1

- old
+ new

@@ -1,7 +1,7 @@ -// Version: v1.0.0-pre.4-293-ge707ffa -// Last commit: e707ffa (2013-02-23 17:35:13 -0500) +// Version: v1.0.0-pre.4-277-g2c0c237 +// Last commit: 2c0c237 (2013-02-21 12:03:23 -0500) (function() { /*global __fail__*/ @@ -148,12 +148,12 @@ }; }; })(); -// Version: v1.0.0-pre.4-293-ge707ffa -// Last commit: e707ffa (2013-02-23 17:35:13 -0500) +// Version: v1.0.0-pre.4-277-g2c0c237 +// Last commit: 2c0c237 (2013-02-21 12:03:23 -0500) (function() { var define, requireModule; @@ -6121,36 +6121,29 @@ }, register: function(type, name, factory, options) { var fullName; + if (type.indexOf(':') !== -1){ options = factory; factory = name; fullName = type; } else { Ember.deprecate('register("'+type +'", "'+ name+'") is now deprecated in-favour of register("'+type+':'+name+'");', true); fullName = type + ":" + name; } - var normalizedName = this.normalize(fullName); - - this.registry.set(normalizedName, factory); - this._options.set(normalizedName, options || {}); + this.registry.set(fullName, factory); + this._options.set(fullName, options || {}); }, resolve: function(fullName) { return this.resolver(fullName) || this.registry.get(fullName); }, - normalize: function(fullName) { - return fullName; - }, - lookup: function(fullName, options) { - fullName = this.normalize(fullName); - options = options || {}; if (this.cache.has(fullName) && options.singleton !== false) { return this.cache.get(fullName); } @@ -6275,12 +6268,11 @@ return options[optionName]; } } function factoryFor(container, fullName) { - var name = container.normalize(fullName); - return container.resolve(name); + return container.resolve(fullName); } function instantiate(container, fullName) { var factory = factoryFor(container, fullName); @@ -11131,12 +11123,44 @@ })(); (function() { +/** +@module ember +@submodule ember-runtime +*/ + +/** + Defines a namespace that will contain an executable application. This is + very similar to a normal namespace except that it is expected to include at + least a 'ready' function which can be run to initialize the application. + + Currently `Ember.Application` is very similar to `Ember.Namespace.` However, + this class may be augmented by additional frameworks so it is important to + use this instance when building new applications. + + # Example Usage + + ```javascript + MyApp = Ember.Application.create({ + VERSION: '1.0.0', + store: Ember.Store.create().from(Ember.fixtures) + }); + + MyApp.ready = function() { + //..init code goes here... + } + ``` + + @class Application + @namespace Ember + @extends Ember.Namespace +*/ Ember.Application = Ember.Namespace.extend(); + })(); (function() { @@ -12414,11 +12438,10 @@ return get(this, 'itemController'); }, objectAtContent: function(idx) { var length = get(this, 'length'), - arrangedContent = get(this,'arrangedContent'), - object = arrangedContent && arrangedContent.objectAt(idx); + object = get(this,'arrangedContent').objectAt(idx); if (idx >= 0 && idx < length) { var controllerClass = this.lookupItemController(object); if (controllerClass) { return this.controllerAt(idx, object, controllerClass);