Skip to content

Instantly share code, notes, and snippets.

@Ondina
Ondina / ModularRouter.as
Last active Dec 20, 2015
ModuleConnectionConfigurator
View ModularRouter.as
package robotlegs.bender.extensions.modularity.impl
{
import flash.events.Event;
import flash.events.IEventDispatcher;
import flash.utils.Dictionary;
import robotlegs.bender.framework.impl.UID;
public class ModularRouter
{
private var _localDispatcher:IEventDispatcher;
@Ondina
Ondina / ViewManagerBasedExistenceWatcher
Created Feb 9, 2013
ViewManagerBasedExistenceWatcher bad hack
View ViewManagerBasedExistenceWatcher
Context:
private var _parentContext:IContext;
public function set parentContext(value:IContext):void
{
_parentContext = value;
}
public function get parentContext():Icontext
{
View populateEmptyStory
public function loadStory(storyStub:StoryVO, recache:Boolean=false):StoryVO
{//Also bad
if (!storyStub.type)
populateEmptyStory(storyStub);
// Optionally force loading from disc and recaching
if (recache)
facade.removeProxy(storyStub.uid);
View StoryProxy
public function loadStory(storyStub:StoryVO, recache:Boolean=false):StoryVO
{
//Actually bad
if (!storyStub.type)
populateEmptyStory(storyStub);
// Optionally force loading from disc and recaching
if (recache)
facade.removeProxy(storyStub.uid);
var cacheProxy:IProxy;
View EditStoryCommand
package com.futurescale.sa.controller.command.story
{
import com.futurescale.sa.controller.constant.AppConstants;
import com.futurescale.sa.model.proxy.StoryProxy;
import com.futurescale.sa.model.vo.ChapterVO;
import com.futurescale.sa.model.vo.PartVO;
import com.futurescale.sa.model.vo.SceneVO;
import com.futurescale.sa.model.vo.StoryVO;
import com.futurescale.sa.view.context.SelectionContext;
View EditStoryCommand
public class EditStoryCommand extends SimpleCommand
{
private var chapter:ChapterVO;
private var part:PartVO;
private var scene:SceneVO;
override public function execute(note:INotification):void
{
// Get the story from the note body.
var story:StoryVO=StoryVO(note.getBody());
@Ondina
Ondina / SomeXML
Created Nov 3, 2011
SomeXML (ViewNavigatorApplication)
View SomeXML
<!--SomeXML-->
<somexml>
<someitem>
<somename>SomeView</somename>
<someid>0</someid>
</someitem>
<someitem>
<somename>AnotherView</somename>
<someid>1</someid>
</someitem>
@Ondina
Ondina / NavigationModel
Created Nov 3, 2011
NavigationModel (ViewNavigatorApplication)
View NavigationModel
package com.robotlegs.demos.robotlegsincremental.models
{
import com.robotlegs.demos.robotlegsincremental.views.components.AnotherView;
import com.robotlegs.demos.robotlegsincremental.views.components.OtherView;
import com.robotlegs.demos.robotlegsincremental.views.components.SomeView;
public class NavigationModel
{
protected var _stackViews:Array=[SomeView, AnotherView, OtherView];
@Ondina
Ondina / NavigationCommand
Created Nov 3, 2011
NavigationCommand (ViewNavigatorApplication)
View NavigationCommand
package com.robotlegs.demos.robotlegsincremental.controllers.commands.mappings
{
import com.robotlegs.demos.robotlegsincremental.controllers.events.NavigationEvent;
import com.robotlegs.demos.robotlegsincremental.controllers.events.SomeViewListEvent;
import com.robotlegs.demos.robotlegsincremental.models.NavigationModel;
import org.robotlegs.mvcs.Command;
/**
*
* @author [Ondina D. F.]
@Ondina
Ondina / NavigationEvent
Created Nov 3, 2011
NavigationEvent (ViewNavigatorApplication)
View NavigationEvent
package com.robotlegs.demos.robotlegsincremental.controllers.events
{
import flash.events.Event;
/**
*
* @author [Ondina D. F.]
*
*/
public class NavigationEvent extends Event