Skip to content

Commit bce000e

Browse files
committed
Samples checked.
1 parent b603386 commit bce000e

File tree

13 files changed

+42
-237
lines changed

13 files changed

+42
-237
lines changed

mvcExpress-frameWork.as3proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</library>
7979
<!-- Class files to compile (other referenced classes will automatically be included) -->
8080
<compileTargets>
81-
<compile path="test\MvcExpressTestRunner.as" />
81+
<compile path="sampleProjects\com\mindScriptAct\proxyHostSample\ProxyHostMain.as" />
8282
</compileTargets>
8383
<!-- Paths to exclude from the Project Explorer tree -->
8484
<hiddenPaths>

mvcExpressLogger/com/mindscriptact/mvcExpressLogger/MvcExpressLogger.as

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,31 @@ public class MvcExpressLogger {
7070

7171
static public function init(stage:Stage, x:int = 0, y:int = 0, width:int = 600, height:int = 400, alpha:Number = 0.9, autoShow:Boolean = false, openKeyCode:int = 192, isCtrlKeyNeeded:Boolean = true, isShiftKeyNeeded:Boolean = false, isAltKeyNeeded:Boolean = false):void {
7272

73+
74+
7375
if (!instance) {
7476
allowInstantiation = true;
7577
instance = new MvcExpressLogger();
7678
allowInstantiation = false;
79+
80+
//
81+
instance.stage = stage;
82+
stage.root.addEventListener(KeyboardEvent.KEY_DOWN, instance.handleKeyPress);
83+
84+
instance.x = x;
85+
instance.y = y;
86+
instance.width = width;
87+
instance.height = height;
88+
instance.alpha = alpha;
89+
instance.openKeyCode = openKeyCode;
90+
instance.isCtrlKeyNeeded = isCtrlKeyNeeded;
91+
instance.isShiftKeyNeeded = isShiftKeyNeeded;
92+
instance.isAltKeyNeeded = isAltKeyNeeded;
93+
Style.setStyle(Style.DARK);
94+
Style.LABEL_TEXT = 0xFFFFFF;
7795
}
78-
MvcExpress.debugFunction = instance.traceMvcExpress;
79-
//
80-
instance.stage = stage;
81-
stage.root.addEventListener(KeyboardEvent.KEY_DOWN, instance.handleKeyPress);
8296

83-
instance.x = x;
84-
instance.y = y;
85-
instance.width = width;
86-
instance.height = height;
87-
instance.alpha = alpha;
88-
instance.openKeyCode = openKeyCode;
89-
instance.isCtrlKeyNeeded = isCtrlKeyNeeded;
90-
instance.isShiftKeyNeeded = isShiftKeyNeeded;
91-
instance.isAltKeyNeeded = isAltKeyNeeded;
92-
Style.setStyle(Style.DARK);
93-
Style.LABEL_TEXT = 0xFFFFFF;
97+
MvcExpress.debugFunction = instance.traceMvcExpress;
9498

9599
if (autoShow) {
96100
instance.showLogger();
@@ -236,19 +240,14 @@ public class MvcExpressLogger {
236240
commandMapingButton.x = allButtons[allButtons.length - 1].x + allButtons[allButtons.length - 1].width + 5;
237241
allButtons.push(commandMapingButton);
238242

239-
240-
241-
242-
243243
var clearButton:PushButton = new PushButton(logWindow, 0, 5, "clear log", handleClearLog);
244244
clearButton.x = allButtons[allButtons.length - 1].x + allButtons[allButtons.length - 1].width + 10;
245245
clearButton.width = 50;
246246
clearButton.height = 15;
247247

248248
autoLogCheckBox = new CheckBox(logWindow, 0, 5, "autoScroll", handleAutoScrollTogle);
249249
autoLogCheckBox.x = allButtons[allButtons.length - 1].x + allButtons[allButtons.length - 1].width + 70;
250-
autoLogCheckBox.selected = true;
251-
250+
autoLogCheckBox.selected = true;
252251

253252
}
254253
//forceThisOnTop();
@@ -260,7 +259,7 @@ public class MvcExpressLogger {
260259
}
261260

262261
private function handleClearLog(event:MouseEvent):void {
263-
trace( "MvcExpressLogger.handleClearLog > event : " + event );
262+
trace("MvcExpressLogger.handleClearLog > event : " + event);
264263
logText = "";
265264
render();
266265
}

sampleProjects/com/mindScriptAct/modularSample/view/ModularSampleMediator.as

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public class ModularSampleMediator extends Mediator {
4141
new PushButton(view, 500, 345, "message to #1", handleMessageToFirst).width = 150;
4242
new PushButton(view, 500, 370, "message to #2 and #4", handleMessageToEven).width = 150;
4343
new PushButton(view, 500, 395, "message to all", handleMessageToAll).width = 150;
44-
new PushButton(view, 500, 425, "message to all no store", handleMessageToAllNoStore).width = 150;
45-
new PushButton(view, 500, 525, "testing....", handleMessageToAllDublicate).width = 150;
44+
//new PushButton(view, 500, 425, "message to all no store", handleMessageToAllNoStore).width = 150;
45+
//new PushButton(view, 500, 525, "testing....", handleMessageToAllDublicate).width = 150;
4646
}
4747

4848
override public function onRemove():void {
@@ -106,23 +106,23 @@ public class ModularSampleMediator extends Mediator {
106106
}
107107

108108
public function handleMessageToFirst(event:MouseEvent):void {
109-
sendMessage(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, new ConsoleParams("Message to FIRST module!!!", [1]));
109+
sendMessageToAll(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, new ConsoleParams("Message to FIRST module!!!", [1]));
110110
}
111111

112112
public function handleMessageToEven(event:MouseEvent):void {
113-
sendMessage(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, new ConsoleParams("Message to even modules!!! (2 and 4)", [2, 4]));
113+
sendMessageToAll(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, new ConsoleParams("Message to even modules!!! (2 and 4)", [2, 4]));
114114
}
115115

116116
public function handleMessageToAll(event:MouseEvent):void {
117-
sendMessage(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL, "Global message to all modules!!!");
117+
sendMessageToAll(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL, "Global message to all modules!!!");
118118
}
119119

120-
public function handleMessageToAllNoStore(event:MouseEvent):void {
121-
sendMessage(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL_DONT_STORE, "Global message to all modules without using proxy!!!");
122-
}
123-
124-
public function handleMessageToAllDublicate(event:MouseEvent):void {
125-
sendMessage(ConsoleViewMsg.INPUT_MESSAGE, "Global message to all modules without using proxy!!!");
126-
}
120+
//public function handleMessageToAllNoStore(event:MouseEvent):void {
121+
//sendMessageToAll(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL_DONT_STORE, "Global message to all modules without using proxy!!!");
122+
//}
123+
//
124+
//public function handleMessageToAllDublicate(event:MouseEvent):void {
125+
//sendMessageToAll(ConsoleViewMsg.INPUT_MESSAGE, "Global message to all modules without using proxy!!!");
126+
//}
127127
}
128128
}

sampleProjects/com/mindScriptAct/modules/console/Console.as

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.mindScriptAct.modules.console.msg.ConsoleViewMsg;
1010
import com.mindScriptAct.modules.console.view.ConsoleMediator;
1111
import com.mindScriptAct.modules.globalMessages.GlobalMessage;
1212
import com.mindScriptAct.modules.ModuleNames;
13+
import com.mindscriptact.mvcExpressLogger.MvcExpressLogger;
1314
import flash.display.Sprite;
1415
import flash.text.TextField;
1516
import flash.text.TextFieldType;
@@ -39,15 +40,18 @@ public class Console extends ModuleSprite {
3940
// for debugging
4041
CONFIG::debug {
4142
checkClassStringConstants(ConsoleMsg, ConsoleDataMsg, ConsoleViewMsg);
43+
MvcExpressLogger.init(this.stage, 700, 0, 800, 400, 1, true);
4244
}
4345

4446
// set up commands
45-
commandMap.mapRemote(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, HandleTargetedMessageCommand, ModuleNames.SHELL);
46-
commandMap.mapRemote(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL, HandleInputCommand, ModuleNames.SHELL);
47+
//commandMap.mapRemote(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, HandleTargetedMessageCommand, ModuleNames.SHELL);
48+
//commandMap.mapRemote(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL, HandleInputCommand, ModuleNames.SHELL);
4749
commandMap.map(ConsoleViewMsg.INPUT_MESSAGE, HandleInputCommand);
50+
commandMap.map(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL, HandleInputCommand);
51+
commandMap.map(GlobalMessage.SEND_TARGETED_INPUT_MESSAGE, HandleTargetedMessageCommand);
4852

4953
// TODO : remove after dublicating messages is fixed.
50-
commandMap.mapRemote(ConsoleViewMsg.INPUT_MESSAGE, HandleInputCommand, ModuleNames.SHELL);
54+
//commandMap.mapRemote(ConsoleViewMsg.INPUT_MESSAGE, HandleInputCommand, ModuleNames.SHELL);
5155

5256
// set up view
5357
proxyMap.map(new ConsoleLogProxy(consoleId));

sampleProjects/com/mindScriptAct/modules/console/view/ConsoleMediator.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ConsoleMediator extends Mediator {
2121
view.inputBtn.addEventListener(MouseEvent.CLICK, handleInputText);
2222

2323
addHandler(ConsoleDataMsg.MESSAGE_ADDED, handleMessageAdded);
24-
addRemoteHandler(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL_DONT_STORE, handleMessageAdded, ModuleNames.SHELL);
24+
//addRemoteHandler(GlobalMessage.SEND_INPUT_MESSAGE_TO_ALL_DONT_STORE, handleMessageAdded, ModuleNames.SHELL);
2525

2626
}
2727

sampleProjects/com/mindScriptAct/proxyHostSample/ProxyHostMain.as

Lines changed: 0 additions & 16 deletions
This file was deleted.

sampleProjects/com/mindScriptAct/proxyHostSample/ProxyHostMainModule.as

Lines changed: 0 additions & 44 deletions
This file was deleted.

sampleProjects/com/mindScriptAct/proxyHostSample/messages/DataMessage.as

Lines changed: 0 additions & 12 deletions
This file was deleted.

sampleProjects/com/mindScriptAct/proxyHostSample/messages/Message.as

Lines changed: 0 additions & 12 deletions
This file was deleted.

sampleProjects/com/mindScriptAct/proxyHostSample/messages/ViewMessage.as

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)