atomController is now known as $atomController.

This commit is contained in:
Corey Johnson
2011-11-07 14:55:38 -08:00
parent 7ab473b0ce
commit 4e9a73cebc
4 changed files with 10 additions and 10 deletions

View File

@@ -92,7 +92,6 @@
NSDictionary *defaults = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], @"WebKitDeveloperExtras",
[NSNumber numberWithBool:YES], @"WebKitScriptDebuggerEnabled",
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
}

View File

@@ -44,7 +44,7 @@
[self setWindowFrameAutosaveName:@"atomController"];
jscocoa = [[JSCocoa alloc] initWithGlobalContext:[[webView mainFrame] globalContext]];
[jscocoa setObject:self withName:@"atomController"];
[jscocoa setObject:self withName:@"$atomController"];
NSURL *resourceURL = [[NSBundle mainBundle] resourceURL];
NSURL *indexURL = [resourceURL URLByAppendingPathComponent:@"index.html"];

View File

@@ -69,7 +69,7 @@
<script src='src/require.js'></script>
<script>
window.onerror = function() {
atomController.webView.inspector.showConsole(true)
window.showConsole(true)
}
window.onload = function() {

View File

@@ -20,10 +20,12 @@ windowAdditions =
appRoot: OSX.NSBundle.mainBundle.resourcePath
path: null
startup: () ->
KeyBinder.register "window", window
@path = atomController.path
@path = $atomController.path
@setTitle _.last @path.split '/'
@editor = new Editor
@@ -71,24 +73,23 @@ windowAdditions =
require "~/.atomicity/settings.coffee"
showConsole: ->
atomController.webView.inspector.showConsole true
$atomController.webView.inspector.showConsole true
setTitle: (title) ->
atomController.window.title = title
$atomController.window.title = title
reload: ->
atomController.close
$atomController.close
OSX.NSApp.createController @path
# Do open and close even belong here?
open: (path) ->
atomController.window.makeKeyAndOrderFront atomController
$atomController.window.makeKeyAndOrderFront atomController
Event.trigger 'window:open', path
close: (path) ->
extension.shutdown() for name, extension of @extensions
atomController.close
$atomController.close
Event.trigger 'window:close', path
# Global methods that are used by the cocoa side of things