Skip to content

Instantly share code, notes, and snippets.

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());
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;
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);
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;
@Ondina
Ondina / ViewManagerBasedExistenceWatcher
Created February 9, 2013 11:17
ViewManagerBasedExistenceWatcher bad hack
Context:
private var _parentContext:IContext;
public function set parentContext(value:IContext):void
{
_parentContext = value;
}
public function get parentContext():Icontext
{
@Ondina
Ondina / ModularRouter.as
Last active December 20, 2015 13:19
ModuleConnectionConfigurator
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;