make controller a required property of ArchiveUI
This commit is contained in:
@@ -149,7 +149,7 @@
|
|||||||
:Map<String,Command> commands (new Map)
|
:Map<String,Command> commands (new Map)
|
||||||
:NameSystem nameSystem (new NameSystem)]
|
:NameSystem nameSystem (new NameSystem)]
|
||||||
|
|
||||||
(ui.setController this)
|
(set ui.controller this)
|
||||||
|
|
||||||
// Add systems!
|
// Add systems!
|
||||||
(archive.addSystem nameSystem)
|
(archive.addSystem nameSystem)
|
||||||
|
@@ -4,9 +4,9 @@ import nat.ArchiveController;
|
|||||||
|
|
||||||
interface ArchiveUI {
|
interface ArchiveUI {
|
||||||
/**
|
/**
|
||||||
* Accept and store a reference to the controller
|
* Reference to the ArchiveController
|
||||||
*/
|
*/
|
||||||
function setController(controller:ArchiveController):Void;
|
var controller(default, default):ArchiveController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt the user to enter text
|
* Prompt the user to enter text
|
||||||
|
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
(prop &mut :ArchiveController controller)
|
(prop &mut :ArchiveController controller)
|
||||||
|
|
||||||
(method :Void setController [controller] (set this.controller controller))
|
|
||||||
|
|
||||||
(defNew [])
|
(defNew [])
|
||||||
|
|
||||||
(method :Void enterText [prompt resolve maxLength]
|
(method :Void enterText [prompt resolve maxLength]
|
||||||
|
@@ -4,14 +4,10 @@ import nat.*;
|
|||||||
import nat.ArchiveController.ChangeSet;
|
import nat.ArchiveController.ChangeSet;
|
||||||
|
|
||||||
class DummyUI implements ArchiveUI {
|
class DummyUI implements ArchiveUI {
|
||||||
var controller:ArchiveController = null;
|
public var controller:ArchiveController = null;
|
||||||
|
|
||||||
public function new() {}
|
public function new() {}
|
||||||
|
|
||||||
public function setController(controller:ArchiveController) {
|
|
||||||
this.controller = controller;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function enterText(prompt:String, resolve:(String) -> Void, maxLength:Float) {
|
public function enterText(prompt:String, resolve:(String) -> Void, maxLength:Float) {
|
||||||
// TODO for proper testing, this will need to resolve with specific pre-coded strings
|
// TODO for proper testing, this will need to resolve with specific pre-coded strings
|
||||||
resolve("");
|
resolve("");
|
||||||
|
@@ -105,9 +105,6 @@
|
|||||||
(prop &mut :ArchiveController controller)
|
(prop &mut :ArchiveController controller)
|
||||||
(prop &mut :Archive archive)
|
(prop &mut :Archive archive)
|
||||||
|
|
||||||
(method :Void setController [controller]
|
|
||||||
(set this.controller controller))
|
|
||||||
|
|
||||||
(prop &mut :FlxText textInputLabel null)
|
(prop &mut :FlxText textInputLabel null)
|
||||||
(prop &mut :FlxInputText textInput null)
|
(prop &mut :FlxInputText textInput null)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user