Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

for marvin

  • Loading branch information...
commit 71672f18052082a94cdd46d1e7a5d4569eb43310 1 parent 32e2f93
FrancisVarga authored
View
29 .settings/launch/WeLoveFDT_Robotlegs.launch
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="com.powerflasher.fdt.ui.MxmlcGroup">
+<stringAttribute key="APP_ARGUMENTS" value=""/>
+<stringAttribute key="ARGUMENTS" value=""/>
+<booleanAttribute key="KILL_PREVIUOS_VIEWER" value="true"/>
+<stringAttribute key="LAUNCHER_DEPENDENCIES" value="[Self]"/>
+<stringAttribute key="MAIN_CLASS" value="src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/WeLoveFDT_Robotlegs.as"/>
+<stringAttribute key="OUTPUT" value="bin/WeLoveFDT_Robotlegs.swf"/>
+<booleanAttribute key="PASS_CP" value="true"/>
+<booleanAttribute key="PASS_MAIN_CLASS" value="true"/>
+<booleanAttribute key="PASS_RSLS" value="false"/>
+<booleanAttribute key="PASS_SWCS" value="true"/>
+<intAttribute key="PLAYER_HEIGHT" value="400"/>
+<intAttribute key="PLAYER_WIDTH" value="550"/>
+<stringAttribute key="POST_COMPILE_ANT" value=""/>
+<stringAttribute key="PRE_COMPILE_ANT" value=""/>
+<stringAttribute key="PROJECT_NAME" value="WeLoveFDT_Robotlegs_Webinar"/>
+<stringAttribute key="PUBLISHER_ID" value=""/>
+<booleanAttribute key="START_SWF_ENABLED" value="true"/>
+<stringAttribute key="START_SWF_LOCATION" value="bin/WeLoveFDT_Robotlegs.swf"/>
+<stringAttribute key="START_SWF_WITH" value="Adobe Flash Player"/>
+<booleanAttribute key="USE_PROJECT_COMPILER_ARGUMENTS" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/WeLoveFDT_Robotlegs_Webinar"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+</launchConfiguration>
View
BIN  bin/WeLoveFDT_Robotlegs.swf
Binary file not shown
View
5 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/WeLoveFDT_Robotlegs.as
@@ -8,7 +8,10 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin {
public class WeLoveFDT_Robotlegs extends Sprite {
public function WeLoveFDT_Robotlegs() {
- new ApplicationContext();
+ trace("++++++++++++++++++++++++++++++");
+ trace("WeLoveFDT_Robotlegs");
+ trace("++++++++++++++++++++++++++++++");
+ new ApplicationContext(this);
}
}
}
View
14 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/ApplicationContext.as
@@ -3,8 +3,9 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs {
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands.RSSServiceCommand;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.RSSModel;
- import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services.RSSSerivce;
- import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.ItemView;
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services.RSSService;
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainer;
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainerMediator;
import org.robotlegs.base.ContextEvent;
import org.robotlegs.mvcs.Context;
@@ -21,13 +22,16 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs {
}
override public function startup() : void {
+
+ trace('startup: ' + (startup));
+
commandMap.mapEvent(ContextEvent.STARTUP_COMPLETE, InitialCommand, ContextEvent);
commandMap.mapEvent(RSSSerivceEvent.LOAD_COMPLETE, RSSServiceCommand, RSSSerivceEvent);
- injector.mapSingleton(RSSSerivce);
- injector.mapSingleton(RSSModel);
+ mediatorMap.mapView(MainContainer, MainContainerMediator);
- contextView.addChild(new ItemView());
+ injector.mapSingleton(RSSService);
+ injector.mapSingleton(RSSModel);
super.startup();
}
View
18 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/commands/InitialCommand.as
@@ -1,6 +1,5 @@
package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
- import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
- import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.RSSModel;
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services.RSSService;
import org.robotlegs.mvcs.Command;
@@ -10,24 +9,13 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
public class InitialCommand extends Command {
[Inject]
- public var event : RSSSerivceEvent;
-
- [Inject]
- public var model : RSSModel;
+ public var service : RSSService;
override public function execute() : void {
- switch(event.type){
- case RSSSerivceEvent.LOAD_COMPLETE:
- var rssList : Array = new Array();
- _parseFunction(rssList);
- break;
- default:
- }
+ service.loadRSS("http://welovefdt.com/feed.xml");
}
- private function _parseFunction(rssList : Array) : void {
- }
}
}
View
22 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/commands/RSSServiceCommand.as
@@ -1,4 +1,5 @@
package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views.MainContainer;
import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
import org.robotlegs.mvcs.Command;
@@ -12,7 +13,26 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.commands {
public var event : RSSSerivceEvent;
override public function execute() : void {
- var xmlObj : Object = event.resultData;
+
+
+ trace(event);
+
+ _parseRSSXML(event.resultData);
+
+ var mainContainer : MainContainer = new MainContainer();
+ contextView.addChild(mainContainer);
+
+ dispatch(new RSSSerivceEvent(RSSSerivceEvent.RSS_PARSED));
+
+ }
+
+ private function _parseRSSXML(xmlObj : Object):void
+ {
+ trace("_parseRSSXML()");
+
+ var xmlList : XMLList = new XMLList();
+ xmlList = new XML(xmlObj)["item"];
+
}
}
}
View
1  src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/events/RSSSerivceEvent.as
@@ -6,6 +6,7 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events {
*/
public class RSSSerivceEvent extends Event {
public static const LOAD_COMPLETE : String = "LOAD_COMPLETE";
+ public static const RSS_PARSED : String = "RSS_PARSED";
public var resultData : *;
public function RSSSerivceEvent(type : String, bubbles : Boolean = false, cancelable : Boolean = false) {
super(type, bubbles, cancelable);
View
2  src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/models/RSSModel.as
@@ -8,7 +8,7 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models {
*/
public class RSSModel extends Actor {
- var items : Vector.<IRSSItem> = new Vector.<IRSSItem>();
+ private var items : Vector.<IRSSItem> = new Vector.<IRSSItem>();
public function addItem(item :IRSSItem):void
{
View
3  ...binar/hfug/fromBerlin/mvcs/services/RSSSerivce.as → ...binar/hfug/fromBerlin/mvcs/services/RSSService.as
@@ -11,7 +11,7 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services {
/**
* @author Francis Varga
*/
- public class RSSSerivce extends Actor {
+ public class RSSService extends Actor {
public function loadRSS(url : String):void {
var loader : URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
@@ -26,6 +26,7 @@ package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.services {
}
private function onIOError(event : IOErrorEvent) : void {
+ trace(event.text);
}
}
}
View
9 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/views/MainContainer.as
@@ -0,0 +1,9 @@
+package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views {
+ import flash.display.Sprite;
+
+ /**
+ * @author Francis Varga
+ */
+ public class MainContainer extends Sprite {
+ }
+}
View
25 src/com/welove/fdt/robotlegs/webinar/hfug/fromBerlin/mvcs/views/MainContainerMediator.as
@@ -0,0 +1,25 @@
+package com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.views {
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.events.RSSSerivceEvent;
+ import com.welove.fdt.robotlegs.webinar.hfug.fromBerlin.mvcs.models.RSSModel;
+ import org.robotlegs.mvcs.Mediator;
+ /**
+ * @author Francis Varga
+ */
+ public class MainContainerMediator extends Mediator {
+
+ [Inject]
+ public var model : RSSModel;
+
+ override public function onRegister() : void {
+
+ trace("onRegister");
+
+ addContextListener(RSSSerivceEvent.RSS_PARSED, onRSSParsed);
+
+ }
+
+ private function onRSSParsed(event : RSSSerivceEvent) : void {
+ }
+
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.