From 6ee3e66ecf033318b86af5adc8b121d6ceafddd7 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 18 Jun 2014 13:04:22 -0700 Subject: [PATCH] Don't require Application when creating Window --- lime/app/Application.hx | 4 ++-- lime/ui/Window.hx | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lime/app/Application.hx b/lime/app/Application.hx index 21be23d40..358f07488 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -51,7 +51,7 @@ class Application { public function addWindow (window:Window):Void { windows.push (window); - window.create (); + window.create (this); #if js @@ -119,7 +119,7 @@ class Application { Window.onWindowActivate.add (onWindowActivate); Window.onWindowDeactivate.add (onWindowDeactivate); - var window = new Window (this, config); + var window = new Window (config); var renderer = new Renderer (window); window.width = config.width; diff --git a/lime/ui/Window.hx b/lime/ui/Window.hx index 17d6d407b..19c0d3c3f 100644 --- a/lime/ui/Window.hx +++ b/lime/ui/Window.hx @@ -35,8 +35,6 @@ class Window { public var height:Int; public var width:Int; - private var application:Application; - #if js public var canvas:CanvasElement; public var div:DivElement; @@ -49,9 +47,8 @@ class Window { #end - public function new (application:Application, config:Config) { + public function new (config:Config) { - this.application = application; this.config = config; if (!registered) { @@ -67,7 +64,7 @@ class Window { } - public function create ():Void { + public function create (application:Application):Void { #if js