
registerType('appdoo', (function () { function ProjectScenesController() {} var __super = setSupertypeFromDomain(ProjectScenesController, 'ArrayController', 'Core');

ProjectScenesController.prototype.removeValue = function ProjectScenesController_removeValue(value, sender) {
		this.removeObjectForKey(this.contents.indexOf(value), sender);};
	

ProjectScenesController.prototype.removeObjectForKey = function ProjectScenesController_removeObjectForKey(key, sender) {
		var scene = this.contents[key];
		this.context.projectContext.unregisterReferencesInScene(scene);
	
		
		if (scene && scene.v_showsInTabBar) {
			scene.indexInTabBar = this.context.projectContext.tabBarController.viewControllerIDs.indexOf(scene.viewController.$id);
			this.context.projectContext.tabBarController.removeScene(scene);
			this.context.updateAllPreviewImages();
		}
		__super.prototype.removeObjectForKey.call(this, key, sender);};
	
	
ProjectScenesController.prototype.insertObjectForKey = function ProjectScenesController_insertObjectForKey(scene, key, sender) {
		this.context.projectContext.registerReferencesInScene(scene);
		if (scene.indexInTabBar !== undefined) {
			this.context.projectContext.tabBarController.viewControllerIDs.splice(scene.indexInTabBar,0,scene.viewController.$id);
			delete scene.indexInTabBar;
		}
		__super.prototype.insertObjectForKey.call(this, scene, key, sender);};
	

ProjectScenesController.prototype.readableUndoName = function ProjectScenesController_readableUndoName(change) {

		if (change.type === 'remove') {
			return LocalizedString('Delete Screen');
		}
	
		return __super.prototype.readableUndoName.call(this, change);
};
	

ProjectScenesController.prototype.expectedTypeForProperty = function ProjectScenesController_expectedTypeForProperty(key) {
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return ProjectScenesController; }()));
registerType('appdoo', (function () { function ProjectScenesByIDController() {} var __super = setSupertypeFromDomain(ProjectScenesByIDController, 'ObjectController', 'Core');

	Object.defineProperty(ProjectScenesByIDController.prototype, "contents", {
		get: function () {
			var o = {};
			if (Array.isArray(this.context.projectScenesController.contents)) this.context.projectScenesController.contents.every(function (scene) {
				o[scene.$id] = scene;return true; }, this);
			
			return o;
		}});
	

ProjectScenesByIDController.prototype.expectedTypeForProperty = function ProjectScenesByIDController_expectedTypeForProperty(key) {
	if (key === "contents") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return ProjectScenesByIDController; }()));